-
Notifications
You must be signed in to change notification settings - Fork 269
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
ticdc: fix detecting kafka version #11048
Conversation
Hi @wk989898. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
Please update this section in the PR description:
|
return KafkaVersion, err | ||
} | ||
apiResponse, err := broker.ApiVersions(&sarama.ApiVersionsRequest{Version: 3}) | ||
apiResponse, err := broker.ApiVersions(&sarama.ApiVersionsRequest{Version: requestVersion}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain the detailed behavior with different requestVersion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mockbroker only works when version is equal 3, this version is not supported for
low version kafka, so this change always uses the lowest version 0 to connect
@@ -151,6 +151,7 @@ type Options struct { | |||
ReplicationFactor int16 | |||
Version string | |||
IsAssignedVersion bool | |||
RequestVersion int16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to verify the value range of the RequestVersion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it only use in unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, maybe we should use a const variable and set it in only in tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will be 0 as default, and the unit test needs to be 3.
Please add the test result in pr body. |
/test all |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #11048 +/- ##
================================================
+ Coverage 57.3604% 57.7521% +0.3916%
================================================
Files 851 854 +3
Lines 125590 126475 +885
================================================
+ Hits 72039 73042 +1003
+ Misses 48130 48054 -76
+ Partials 5421 5379 -42 |
We need to consider default-kafka-version. It should be set to the lowest version supported by TiCDC. @3AceShowHand @flowbehappy tiflow/pkg/sink/kafka/sarama.go Line 32 in 1c7c9ae
|
/retest |
@wk989898: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3AceShowHand, CharlesCheung96 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:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/retest |
@wk989898: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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/test-infra repository. |
/retest |
2 similar comments
/retest |
/retest |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created to branch |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
What problem does this PR solve?
Issue Number: close #11047
What is changed and how it works?
Expose
requestVersion
param and use the low version by default.After getting version information, set kafka version as high as possible.
Check List
Tests
note: The max Kafka version which sarama detects is
v2.8.0
.Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note