You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document bulk batch size and concurrency configuration
The flowvault README noted that bulk calls are split into batches sent
concurrently, but never documented how to configure that. Add a
"Batching and concurrency" section covering the per-operation env vars,
their defaults and maximums, and how effective values are resolved.
Values verified against Constants.java and the configure*ConcurrencyAndBatchSize
methods in VaultController: batch size is min(value, max) with a warning-and-
clamp above the max and a warning-and-default for invalid input; concurrency is
additionally capped at ceil(itemCount / batchSize), so it never exceeds the
number of batches to run.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-[Batching and concurrency](#batching-and-concurrency)
31
32
-[Bulk Insert](#bulk-insert)
32
33
-[Bulk Tokenize](#bulk-tokenize)
33
34
-[Bulk Detokenize](#bulk-detokenize)
@@ -307,6 +308,36 @@ Every bulk response has the same two-part shape:
307
308
308
309
That per-record shape is the point of these APIs; see [Error Handling](#error-handling) for the full model.
309
310
311
+
## Batching and concurrency
312
+
313
+
Batch size and concurrency are configured **per operation** through environment variables — there is no builder or options API for them. Each value is read from the process environment first, then from a `.env` file in the working directory.
314
+
315
+
| Operation | Batch size variable | Default | Max | Concurrency variable | Default | Max |
Concurrency defaults to **1**, so batches are sent one after another unless you raise the limit.
323
+
324
+
How each value is resolved:
325
+
326
+
-**Batch size** — `min(yourValue, max)`. Above the max, the SDK logs a warning and uses the max. Zero, negative, or non-numeric values log a warning and fall back to the default.
327
+
-**Concurrency** — `min(yourValue, max, batchCount)`, where `batchCount = ceil(itemCount / batchSize)`. Concurrency never exceeds the number of batches there are to run. Same warning-and-fallback behaviour for invalid values.
328
+
329
+
Those warnings are emitted at `WARN`, which the default `ERROR` level hides — set `LogLevel.WARN` or below to see them (see [Logging](#logging)).
330
+
331
+
For example, 500 records with `INSERT_BATCH_SIZE=100` and `INSERT_CONCURRENCY_LIMIT=10` produces 5 batches, all 5 in flight at once — the concurrency is capped to 5, not 10.
332
+
333
+
```dotenv
334
+
# .env
335
+
INSERT_BATCH_SIZE=100
336
+
INSERT_CONCURRENCY_LIMIT=5
337
+
```
338
+
339
+
The 10,000-item ceiling per bulk call is a separate, fixed limit and is not configurable.
340
+
310
341
# Bulk Insert
311
342
312
343
Insert many records — even across different tables — in a single call. Each record is a `BulkInsertRequestRecord` with its own `data` and, optionally, its own `tableName` and `upsert`.
0 commit comments