Repository navigation
Add bounded concurrent writes to import - #243
Mike Krüger (mkrueger) wants to merge 2 commits into
Conversation
Default to 16 in-flight writes with configurable concurrency and sequential compatibility. Drain started writes on errors and cancellation, preserve accounting, and update help and documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The MCP schema permits non-positive concurrency values despite the positive-integer contract.
1 open finding
What changed in this PR
Adds bounded concurrency to imports to improve throughput while preserving streaming, cancellation, and result accounting.
Changes:
- Adds configurable concurrent writes, defaulting to 16.
- Drains in-flight writes on failures and cancellation.
- Updates tests, help, localization, and documentation.
| File | Description |
|---|---|
README.md |
Documents concurrent imports. |
CHANGELOG.md |
Records the improvement. |
docs/commands.md |
Documents import behavior and options. |
docs/mcp.md |
Documents MCP concurrency. |
CosmosDBShell/lang/en.ftl |
Adds localized help text. |
l10n/CosmosDBShell.json |
Regenerates the localization catalog. |
ImportCommand.cs |
Implements bounded concurrent writes. |
ImportConcurrencyTests.cs |
Tests concurrency, failures, and cancellation. |
ToolOperationsTests.cs |
Tests MCP option metadata. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Code Coverage OverviewLanguages: C# C# / code-coverage/dotnetThe overall line coverage in commit 18cd3d9 in the Show a line coverage summary of the most impacted files.
Updated |
Expose reusable option minimum metadata in MCP schemas and keep dry-run test paths under the temporary directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The bounded scheduling implementation is well tested and its schema, localization, and documentation changes are consistent.
0 open findings
1 resolved since last review
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is bounded, well-documented, and comprehensively covers concurrency and failure behavior with focused tests.
0 open findings
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Summary
Import currently awaits every document write sequentially, making large imports sensitive to per-request network latency. Stream input while keeping a bounded set of writes in flight instead.
--concurrency/ MCPconcurrency, requiring a positive integer. Use--concurrency=1for sequential, file-order behavior.--continue-on-erroris set; drain and account for already-started writes.Behavior notes
Concurrent writes can complete out of order and may succeed after another write fails. Imports remain non-transactional. Use concurrency 1 for repeated-ID ordering or exact sequential stop-on-error behavior. SDK retry behavior and client configuration are unchanged; this does not increase provisioned RU/s.
Independent branch based on
main.