-
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) #4541
sink(cdc): kafka producer use default configuration. (#4359) #4541
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
[REVIEW NOTIFICATION] This pull request has not been approved. 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. |
This is an automated cherry-pick of #4359
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