kafka: bump sarama version and enable the retry to fix the broken pipe and out of order#12618
kafka: bump sarama version and enable the retry to fix the broken pipe and out of order#126183AceShowHand wants to merge 12 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request removes the manual heartbeat and connection keep-alive logic across Kafka sinks and managers, including the removal of the HeartbeatBrokers method and KeepConnAliveInterval configuration. It also updates the sarama dependency and increases the producer's maximum retry count to 5. A review comment suggests updating the documentation in pkg/sink/kafka/sarama.go to reflect whether the previously mentioned ordering issues with retries have been resolved in the new version.
| // According to the https://github.com/IBM/sarama/issues/2619, | ||
| // sarama may send message out of order even set the `config.Net.MaxOpenRequest` to 1, | ||
| // when the kafka cluster is unhealthy and trigger the internal retry mechanism. | ||
| config.Producer.Retry.Max = 0 | ||
| config.Producer.Retry.Max = 5 |
There was a problem hiding this comment.
The comment on lines 61-63 warns that enabling retries in Sarama can lead to out-of-order messages even when MaxOpenRequests is set to 1. However, this PR increases Retry.Max to 5, and the title suggests this change (along with the Sarama version bump) is intended to fix out-of-order issues.
If the ordering issue in Sarama during retries has been fixed in the bumped version or the PingCAP fork, please update or remove this comment to reflect the current state. If the issue persists, enabling retries might re-introduce the ordering problem mentioned in the warning.
|
[FORMAT CHECKER NOTIFICATION] Notice: To remove the 📖 For more info, you can check the "Contribute Code" section in the development guide. |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
@3AceShowHand: The following test failed, say
Full PR test history. Your PR dashboard. 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/test pull-cdc-integration-storage-test |
1 similar comment
|
/test pull-cdc-integration-storage-test |
What problem does this PR solve?
Issue Number: close #xxx
What is changed and how it works?
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note