[client] Scope sender failures to per-table requests - #4017
Open
platinumhamburg wants to merge 1 commit into
Open
[client] Scope sender failures to per-table requests#4017platinumhamburg wants to merge 1 commit into
platinumhamburg wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Updates the client sender to scope RPC failures to the specific per-table request that failed, preventing unrelated table batches sharing the same destination from being failed/retried together.
Changes:
- Refactors
Sendererror-handling to operate on per-table batch lists instead of destination-wide bucket maps. - Extends the test gateway to support completing requests exceptionally (RPC failure simulation).
- Adds/updates writer tests to verify ProduceLog/PutKv RPC failures only affect owned table batches.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| fluss-server/src/test/java/org/apache/fluss/server/tablet/TestTabletServerGateway.java | Adds request-future removal utility and supports failing specific pending requests exceptionally for tests. |
| fluss-client/src/main/java/org/apache/fluss/client/write/Sender.java | Changes failure handling to be scoped per table request by passing per-table batch lists through RPC callbacks. |
| fluss-client/src/test/java/org/apache/fluss/client/write/SenderTest.java | Adds multi-table tests ensuring RPC failures only impact the intended table’s batches; introduces helper utilities for request lookup/failure injection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1226
to
+1232
| private void failRequest(TableBucket referenceBucket, int index, Throwable throwable) { | ||
| TestTabletServerGateway gateway = | ||
| (TestTabletServerGateway) | ||
| metadataUpdater.newTabletServerClientForNode( | ||
| metadataUpdater.leaderFor(DATA1_TABLE_PATH, referenceBucket)); | ||
| gateway.failRequest(index, throwable); | ||
| } |
platinumhamburg
force-pushed
the
fix/issue-3772-sender-rpc-batch-scope
branch
from
August 18, 2026 02:06
b4c4229 to
b75d744
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.
Purpose
Linked issue: close #3772
Brief change log
Tests
API and Format
Documentation