Skip to content

docs: document batch partial-failure semantics (#393) - #541

Merged
s2x merged 3 commits into
masterfrom
fix/393-doc-batch-partial-failure
Sep 9, 2026
Merged

docs: document batch partial-failure semantics (#393)#541
s2x merged 3 commits into
masterfrom
fix/393-doc-batch-partial-failure

Conversation

@s2x

@s2x s2x commented Sep 9, 2026

Copy link
Copy Markdown
Member

Description

Documents the real partial-failure semantics of the batch operations (batchGet/batchPut/batchDelete) in docs/operations.md, per issue #393 (DOC-27). All claims verified against src/Client/RawKv/RawKvBatch.php and src/Client/Batch/BatchAsyncExecutor.php.

Closes #393

Changes

  • Prominent "Batch operations are not atomic" warning at the top of the Batch Operations section (matching the deleteRange warning's prominence).
  • **Throws:** BatchPartialFailureException lines on batchGet, batchPut, batchDelete; non-atomic-write notes with idempotency-based retry guidance per operation.
  • New "Partial Failure and Recovery" subsection: the exact execution model (keys grouped per region → ≤512-key/16 KB sub-batches → per-operation retry budget → concurrent dispatch by BatchAsyncExecutor, errors accumulated, remaining futures cancelled on first wait-phase failure), the exception's accessors with a recovery example, and the caveat that getRegionErrors() keys are internal sub-batch indices, not user keys or TiKV region IDs.
  • BatchDeadlineExceededException documented (explicit $deadlineMs only; no shipped client option wires a batch deadline).
  • deleteRange warning cross-links to the shared semantics; Error Handling section points to the new subsection.
  • CHANGELOG: [DOC-27] entry under [Unreleased] → Documentation; new FAQ entry on the sub-batch-index caveat in docs/helpers/faq.md.

Changelog

Code Review

  • Pending subagent code review

@s2x s2x self-assigned this Sep 9, 2026
s2x added 3 commits September 9, 2026 21:43
…h budget wording, batchPut retry advice consistency, faq sub-batch count accuracy)
…handling.md (#393)

getRegionErrors() is keyed by internal sub-batch indices, not regionIds,
so 're-drive only the failing keys/ranges' advice was wrong there too —
aligned with the operations.md wording from the review.
@s2x
s2x force-pushed the fix/393-doc-batch-partial-failure branch from e7b628a to c8e9d73 Compare September 9, 2026 19:47
@s2x
s2x marked this pull request as ready for review September 9, 2026 19:47
@s2x
s2x merged commit 2104e91 into master Sep 9, 2026
9 checks passed
@s2x
s2x deleted the fix/393-doc-batch-partial-failure branch September 9, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC-27] Document partial-failure semantics for batch operations

1 participant