kafka: bump sarama version and enable the retry to fix the broken pipe and out of order (#5359)#5370
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
@3AceShowHand This PR has conflicts, I have hold it. |
|
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request removes the heartbeat mechanisms from the Kafka sink, producers, and topic managers, and introduces a configurable max-retry option for Kafka producers via the sink URI. However, there are critical unresolved merge conflicts in go.mod, go.sum, and pkg/sink/kafka/options_test.go that must be resolved before this PR can be merged.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/test all |
|
/test all |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3AceShowHand The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/unhold |
|
/test all |
|
/test all |
This is an automated cherry-pick of #5359
What problem does this PR solve?
Issue Number: close #1920
ref pingcap/tiflow#12618
Kafka sink can hit stale broker connections and return errors such as
broken pipe. The old TiCDC-side Kafka heartbeat sentApiVersionsperiodically and ignored errors, so it added background traffic but did not repair a bad connection. Producer retry was also disabled or overridden in different places because older Sarama retry behavior could reorder messages.What is changed and how it works?
This PR migrates the relevant Kafka sink changes from pingcap/tiflow#12618:
v1.41.2-pingcap-20260508, which includes the partition-muting ordering fix.config.Producer.Retry.Maxfrom Kafka sink options for all Kafka producers.max-retrysink URI parameter. Non-negative values are accepted; negative values are ignored and keep the default.5.Net.MaxOpenRequests = 1as an extra ordering guard.Check List
Tests
go test --tags=intest ./pkg/sink/kafka ./downstreamadapter/sink/kafka ./downstreamadapter/sink/topicmanagerQuestions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note