Skip to content

[client] Scope sender failures to per-table requests - #4017

Open
platinumhamburg wants to merge 1 commit into
apache:mainfrom
platinumhamburg:fix/issue-3772-sender-rpc-batch-scope
Open

[client] Scope sender failures to per-table requests#4017
platinumhamburg wants to merge 1 commit into
apache:mainfrom
platinumhamburg:fix/issue-3772-sender-rpc-batch-scope

Conversation

@platinumhamburg

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #3772

Brief change log

Tests

API and Format

Documentation

@luoyuxia
luoyuxia requested a lite review from Copilot August 17, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Sender error-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);
}
Comment thread fluss-client/src/test/java/org/apache/fluss/client/write/SenderTest.java Outdated
@platinumhamburg
platinumhamburg force-pushed the fix/issue-3772-sender-rpc-batch-scope branch from b4c4229 to b75d744 Compare August 18, 2026 02:06
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.

[client] Sender handles a per-table RPC failure using destination-wide write batches

2 participants