Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kafka(ticdc): sarama do not retry if produce message failed to prevent out of order #11870

Merged
merged 4 commits into from
Dec 31, 2024

Conversation

3AceShowHand
Copy link
Contributor

@3AceShowHand 3AceShowHand commented Dec 12, 2024

What problem does this PR solve?

Issue Number: close #11935

What is changed and how it works?

  • config.Net.MaxOpenRequest is set to 1
  • config.Producer.Retry.Max is set to 0, to disable the internal retry mechanism

The root cause of the out-of-order message problem comes from the sarama internal bug, cannot be easily fixed, this is a workaround solution, by set the retry.max to 0, to disable the retry.

Check List

Tests

  • Unit test
  • Integration test

This is tested by an internal E2E test, which inject network partition between the random cdc node and random kafka server. Before this PR, the test case cannot be passed, and we found out-of-order message by reading consumer log, after this PR it can be passed, and no out-of-order message.

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

fix the sarama retry caused out-of-order message by set retry count to 0 as a workaround

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 12, 2024
@3AceShowHand
Copy link
Contributor Author

/retest

4 similar comments
@3AceShowHand
Copy link
Contributor Author

/retest

@3AceShowHand
Copy link
Contributor Author

/retest

@3AceShowHand
Copy link
Contributor Author

/retest

@3AceShowHand
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 26, 2024
@3AceShowHand 3AceShowHand changed the title [DNM] kafka(ticdc): sarama do not retry if produce message failed kafka(ticdc): sarama do not retry if produce message failed Dec 31, 2024
@3AceShowHand 3AceShowHand changed the title kafka(ticdc): sarama do not retry if produce message failed kafka(ticdc): sarama do not retry if produce message failed to prevent out of order Dec 31, 2024
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed labels Dec 31, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 31, 2024
@3AceShowHand
Copy link
Contributor Author

/retest

1 similar comment
@3AceShowHand
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 31, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 31, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-31 06:42:40.487588653 +0000 UTC m=+419095.843593192: ☑️ agreed by wk989898.
  • 2024-12-31 07:13:30.961607392 +0000 UTC m=+420946.317611963: ☑️ agreed by asddongmen.

@3AceShowHand
Copy link
Contributor Author

/retest

Copy link
Contributor

ti-chi-bot bot commented Dec 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asddongmen, hongyunyan, wk989898

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [asddongmen,hongyunyan,wk989898]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@3AceShowHand
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit ca34dc8 into pingcap:master Dec 31, 2024
26 checks passed
@3AceShowHand
Copy link
Contributor Author

/cherry-pick release-8.1
/cherry-pick release-7.5

@3AceShowHand
Copy link
Contributor Author

/cherry-pick release-8.5

@ti-chi-bot
Copy link
Member

@3AceShowHand: new pull request created to branch release-7.5: #11960.

In response to this:

/cherry-pick release-8.1
/cherry-pick release-7.5

Instructions 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.

@ti-chi-bot
Copy link
Member

@3AceShowHand: new pull request created to branch release-8.5: #11961.

In response to this:

/cherry-pick release-8.5

Instructions 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.

@ti-chi-bot
Copy link
Member

@3AceShowHand: new pull request created to branch release-8.1: #11962.

In response to this:

/cherry-pick release-8.1
/cherry-pick release-7.5

Instructions 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.

Copy link
Contributor

ti-chi-bot bot commented Jan 5, 2025

@3AceShowHand: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-dm-integration-test f1d8b2e link true /test dm-integration-test
pull-cdc-integration-pulsar-test f1d8b2e link true /test cdc-integration-pulsar-test

Full PR test history. Your PR dashboard.

Instructions 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.

3AceShowHand added a commit to 3AceShowHand/tiflow that referenced this pull request Jan 6, 2025
ti-chi-bot bot pushed a commit that referenced this pull request Jan 7, 2025
ti-chi-bot bot pushed a commit that referenced this pull request Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sarama produces messages in out-of-order when retries happen
5 participants