Repository navigation
fix(batch): bound every batch with a finite default batch deadline (#275) - #765
Merged
Merged
Conversation
…itted txn committed (#275)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #275.
Summary
TimeoutConfig::batchDeadlineMsnow defaults toDEFAULT_BATCH_DEADLINE_MS(60000). An explicit0keeps the old unbounded behaviour (opt-out).readTimeoutMsis excluded: only point reads use it).BatchAsyncExecutor::executeParallelCapped(): all windows now share one deadline budget, as its docblock promised. The deadline exception reports the configured deadline, the total elapsed time and every sub-batch without a result.RawKvScanner: the budget is shared across the windows of one region batch, and a deadline no longer falls back to the unbounded sequential scan.commit()does not throw. A deadline in a rollback fan-out propagates and the transaction stays rollback-able.RawKvBatchDeadlineEnforcementTest.batchDeadlineMsplus one region's full retry loop.BREAKING (CHANGELOG
### Changed, with a migration note): batches are now bounded by default. SetbatchDeadlineMsto0to keep the old behaviour.Not covered: the experimental BatchCommands path (
RawKvBatch::tryMultiplex, off by default) has only a per-call limit.Test plan
composer lintcomposer test:unit(1973 tests)composer test:grpc(321 tests; the 1 warning also occurs on master)