-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-12030][connector/kafka] Check the topic existence after topic creation using KafkaConsumer #12255
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
Conversation
…creation using KafkaConsumer.
|
@pnowojski Will you have time to take a look? Thanks. |
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 175623d (Fri Oct 16 10:53:55 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
aljoscha
left a comment
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.
The changes look good, modulo one comment.
I'm wondering why you only fix it for Kafka 0.10 and 0.11? I know that the Kafka "Modern" version uses the AdminClient directly but it seems some of the failures on https://issues.apache.org/jira/browse/FLINK-12030 also happened on that "modern" Kafka connector.
| do { | ||
| topicCreated = !consumer.partitionsFor(topic).isEmpty(); | ||
| if (!topicCreated) { | ||
| Thread.sleep(1); |
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.
Maybe 1ms sleep is a bit to agressive. 10 or even 100 should work as well
|
@aljoscha Thanks for the review. I went through all the reported failures in the Jira ticket. It looks people are reporting two different issues.
All the failures caused by issue 2 are either from 0.10 or 0.11 Kafka connectors, while the first issues are reported on all the versions. I think people are just adding comments to the same ticket once they see this test failed, regardless of the failure cause. That being said, theoretically speaking, using |
|
Thanks for the explanation! |
What is the purpose of the change
Fix unstable Kafka IT case by checking the topic existence with
KafkaConsumer.Brief change log
Check the topic existence with
KafkaConsumer.Verifying this change
This change is already covered by existing tests.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): ( no)Documentation