Skip to content

Commit 61f86de

Browse files
committed
docs: update docs for global execution options
1 parent 673b946 commit 61f86de

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/docs/core/flow_def.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ These options can be passed in to the following APIs:
370370

371371
* [`FlowBuilder.add_source()`](#import-from-source): The options above control the processing concurrency of multiple rows from a source. New rows will not be loaded in memory if it'll be over the limit.
372372

373-
The default value can be specified by [`GlobalExecutionOptions`](/docs/core/settings#defaultexecutionoptions) or corresponding [environment variables](/docs/core/settings#list-of-environment-variables).
373+
Besides, global limits on overall processing concurrency of all sources from all flows can be specified by [`GlobalExecutionOptions`](/docs/core/settings#globalexecutionoptions) or corresponding [environment variables](/docs/core/settings#list-of-environment-variables).
374+
If both global and per-source limits are specified, both need to be satisfied to admit additional source rows.
374375

375376
* [`DataSlice.row()`](#for-each-row): The options above provides a finer-grained control, to limit the processing concurrency of multiple rows within a table at any level.
376377

docs/docs/core/settings.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ You have two ways to launch CocoIndex:
6060

6161
* `app_namespace` (type: `str`, required): The namespace of the application.
6262
* `database` (type: `DatabaseConnectionSpec`, required): The connection to the Postgres database.
63-
* `global_execution_options` (type: `GlobalExecutionOptions`, optional): The default execution options for the flow.
63+
* `global_execution_options` (type: `GlobalExecutionOptions`, optional): The global execution options shared by all flows.
6464

6565
### App Namespace
6666

@@ -107,12 +107,13 @@ If you use the Postgres database hosted by [Supabase](https://supabase.com/), pl
107107

108108
### GlobalExecutionOptions
109109

110-
`GlobalExecutionOptions` is used to configure the default execution options for the flow. It has the following fields:
110+
`GlobalExecutionOptions` is used to configure the global execution options shared by all flows. It has the following fields:
111111

112-
* `source_max_inflight_rows` (type: `int`, optional): The maximum number of concurrent inflight requests for source operations.
113-
* `source_max_inflight_bytes` (type: `int`, optional): The maximum number of concurrent inflight bytes for source operations.
112+
* `source_max_inflight_rows` (type: `int`, optional): The maximum number of concurrent inflight requests for all source operations.
113+
* `source_max_inflight_bytes` (type: `int`, optional): The maximum number of concurrent inflight bytes for all source operations.
114114

115-
The options provide default values, and can be overridden by arguments passed to `FlowBuilder.add_source()` on per-source basis ([details](/docs/core/flow_def#control-processing-concurrency)).
115+
See also [flow definition docs](/docs/core/flow_def#control-processing-concurrency) to control processing concurrency on per-source basis.
116+
If both global and per-source limits are specified, both need to be satisfied to admit additional source rows.
116117

117118
## List of Environment Variables
118119

0 commit comments

Comments
 (0)