diff --git a/docs/src/main/sphinx/connector/mongodb.md b/docs/src/main/sphinx/connector/mongodb.md index ff66ceaef678..5edcf63b6451 100644 --- a/docs/src/main/sphinx/connector/mongodb.md +++ b/docs/src/main/sphinx/connector/mongodb.md @@ -59,6 +59,7 @@ The following configuration properties are available: | `mongodb.write-concern` | The write concern | | `mongodb.required-replica-set` | The required replica set name | | `mongodb.cursor-batch-size` | The number of elements to return in a batch | +| `mongodb.allow-local-scheduling` | Assign MongoDB splits to a specific worker | ### `mongodb.connection-url` @@ -203,6 +204,15 @@ Do not use a batch size of `1`. This property is optional; the default is `0`. +### `mongodb.allow-local-scheduling` + +Set the value of this property to `true` if Trino and MongoDB share the same +cluster, and specific MongoDB splits should be processed on the same worker and +MongoDB node. Note that a shared deployment is not recommended, and enabling +this property can lead to resource contention. + +This property is optional, and defaults to false. + (table-definition-label)= ## Table definition diff --git a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoClientConfig.java b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoClientConfig.java index eeca4862120b..9d87b72ff47c 100644 --- a/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoClientConfig.java +++ b/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoClientConfig.java @@ -259,7 +259,7 @@ public boolean isAllowLocalScheduling() } @Config("mongodb.allow-local-scheduling") - @ConfigDescription("Assign mongo splits to host if worker and mongo share the same cluster") + @ConfigDescription("Assign MongoDB splits to a specific host if worker and MongoDB share the same cluster") public MongoClientConfig setAllowLocalScheduling(boolean allowLocalScheduling) { this.allowLocalScheduling = allowLocalScheduling;