kafka: verify replication-factor when need to create the topic (#5715) - #5813
kafka: verify replication-factor when need to create the topic (#5715)#5813ti-chi-bot wants to merge 1 commit into
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
This cherry pick PR is for a release branch and has not yet been approved by triage owners. To merge this cherry pick:
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. |
|
@3AceShowHand This PR has conflicts, I have hold it. |
|
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide. 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 ti-community-infra/tichi repository. |
|
[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 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
close by #5811 |
This is an automated cherry-pick of #5715
What problem does this PR solve?
Issue Number: close #5720
Kafka sink
Verifyreturned immediately after fetching metadata when the target topic already existed. This skippedNewEventEncoder, so encoder-owned checks—most notably Avro Schema Registry connectivity—were not run.replication-factoris a topic creation option. The previous path could validate it even when the topic already existed or automatic topic creation was disabled, although TiCDC would not use it in either case.What is changed and how it works?
masterand remove the early return for an existing topic. Encoder initialization now runs after Kafka verification for both existing and missing topics.required-acks=all, compare the configured replication factor with the brokermin.insync.replicas;CreateTopicrequest during sink verification.replication-factorwhile applying sink options.Check List
Tests
Unit test
go test --tags=intest ./pkg/sink/kafka ./downstreamadapter/sink/kafka ./downstreamadapter/sink/topicmanager -count=1Questions
Will it cause performance regression or break compatibility?
No. This changes verification and topic-creation validation only. It does not change a public API or protocol.
Do you need to update user documentation, design documentation, or monitoring documentation?
No.
Release note