-
Notifications
You must be signed in to change notification settings - Fork 288
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
sink(cdc): kafka producer use default configuration. #4359
sink(cdc): kafka producer use default configuration. #4359
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
8c97d96
to
39da317
Compare
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #4359 +/- ##
================================================
- Coverage 55.6402% 55.5626% -0.0776%
================================================
Files 494 502 +8
Lines 61283 62362 +1079
================================================
+ Hits 34098 34650 +552
- Misses 23750 24251 +501
- Partials 3435 3461 +26 |
/run-all-tests |
/run-dm-integration-test |
/run-all-tests |
/run-kafka-integration-test |
1 similar comment
/run-kafka-integration-test |
/run-all-tests |
/run-kafka-integration-test |
/run-all-tests |
/run-dm-integration-test |
/run-kafka-integration-test |
1 similar comment
/run-kafka-integration-test |
+1 |
/run-kafka-integration-test |
/run-kafka-integration-test /tidb=pr/32081 |
1 similar comment
/run-kafka-integration-test /tidb=pr/32081 |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4541. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4542. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4543. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4544. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4545. |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4546. |
What problem does this PR solve?
Issue Number: close #4383, close #4499
If the network condition between the TiCDC and Kafka is not good enough, let producer get responses from Kafka as soon as possible, to prevent waste too much time
.What is changed and how it works?
change kafka producer to use default configurations, to prevent wast too much time on network communication with a Kafka cluster in bad network conditions.
Net.DialTimeout
,Net.WriteTimeout
,Net.ReadTimeout
to10s
Metadata.Retry.Max
to 1, to makeRefreshMatadata
return fastCheck List
Tests
as shown in the log above, the owner can be closed in around 1 second.
10s later, the changefeed restart, and failed in around 1 second again.
18s later, the changefeed restart again....
the restart logic is handled by
feed_state_manager
.When the Kafka cluster is in a bad network condition, this configuration will detect it very fast, to prevent wasting too much time. But this would also have a false-negative case, such as the user's network is just not fast enough...
It looks that the processor should be fully closed before the owner tries to initialize the changefeed again. Or, the owner shouldn't try to initialize the changefeed before the processor is not fully closed.
Code changes
Side effects
Related changes
Release note