DDQueue: batch drain relocationComplete to bound fetchKeysComplete#13660
Merged
Conversation
The DDQueue choose loop processes one event per iteration. When dataTransferComplete and other events are frequent, relocationComplete handling can be delayed -- fetchKeysComplete entries (erased only in the relocationComplete handler) accumulate. Batch-draining up to 1000 ready completions per choose iteration keeps the set bounded. Changes: - Extract processRelocationComplete() for reuse in drain loop - Store FutureStream as state variable for isReady()/pop() access - Guard drain loop with !isError() so pop() cannot throw when the stream carries an error after all data items are consumed - Add RelocationCompleteBatchDrain trace event with .suppressFor(1.0) - Add /dd/queue/relocationComplete/batchDrained SimpleCounter metric - Add unit test verifying burst completions are fully drained
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS 14.x
|
Contributor
Result of foundationdb-pr-clang-arm on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos on macOS 14.x
|
gxglass
approved these changes
Jul 9, 2026
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS 14.x
|
Contributor
Result of foundationdb-pr-macos on macOS 14.x
|
Contributor
Result of foundationdb-pr-clang-arm on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS 14.x
|
Contributor
Result of foundationdb-pr-clang-arm on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos on macOS 14.x
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
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.
This is #12993 forward-ported. When #12933 was done, it seemed like a critical fix. The heat has come off it but still seems like a good thing to do: i.e. bulk cleanup if the opportunity presents itself rather than do one at a time each time around.
The DDQueue choose loop processes one event per iteration. When dataTransferComplete and other events are frequent, relocationComplete handling can be delayed -- fetchKeysComplete entries (erased only in the relocationComplete handler) accumulate. Batch-draining up to 1000 ready completions per choose iteration keeps the set bounded.
Changes: