[client] Clean up batches when synchronous sends fail - #4028
Open
gyang94 wants to merge 1 commit into
Open
Conversation
gyang94
marked this pull request as ready for review
August 18, 2026 07:31
Handle failures thrown before an RPC future is returned so drained batches do not remain permanently in-flight or retain writer-buffer pages. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-5 AI-Contributed/Feature: 51/51 AI-Contributed/UT: 37/37
gyang94
force-pushed
the
codex/fix-sender-sync-send-failure
branch
from
August 19, 2026 03:04
561c5e4 to
78f7477
Compare
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.
Summary
Root cause
Sender registers drained batches as in-flight before invoking the tablet-server gateway. If RPC request construction or encoding throws synchronously, no response future or completion callback is installed. The affected batches therefore remain incomplete, retain writer-buffer pages indefinitely, and can eventually block the writer after the buffer is exhausted.
Test Plan
SenderTest: 22 tests passed.git diff --cached --check.Fixes #4018
🤖 AI-assisted changes - reviewed by human developer