Skip to content
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

fix(dataflow): wait for kafka topic creation #47

Conversation

lc525
Copy link
Owner

@lc525 lc525 commented Feb 25, 2024

What this PR does / why we need it:
Kafka topic creation happens asynchronously. This means that even when the return value from createTopics(...) indicates that the topic has been created successfuly, the topic can not be immediately subscribed to.

Instead of verifying the status of the topic from the createTopics return value, here we're repeatedly calling describeTopics until all of the topics for the pipeline can be described successfully. This indicates that the topic has been fully created at least on one broker, and can now be subscribed to.

Which issue(s) this PR fixes:
Fixes dataflow component for #INFRA-663 (internal): Pipeline creation goes into ERROR state

** PR Merge Sequencing GROUP 663 **
This is part of a sequence of PRs building on each-other, but split in order to simplify reviewing.
This PR has sequence no: G663/2

@lc525 lc525 changed the title fix(dataflow) wait for kafka topic creation fix(dataflow): wait for kafka topic creation Feb 26, 2024
Copy link

@sakoush sakoush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. some minor comments

Kafka topic creation happens asynchronously. This means that even when
the return value from `createTopics(...)` indicates that the topic has
been created successfuly, the topic can not be immediately subscribed
to.

Instead of verifying the status of the topic from the `createTopics`
return value, here we're repeatedly calling `describeTopics` until
all of the topics for the pipeline can be described successfully.
This indicates that the topic has been fully created _at least_ on
one broker, and can now be subscribed to.
@lc525 lc525 force-pushed the fix.dataflow.kafka-wait-for-topic-creation branch from c544b45 to 8b70780 Compare February 26, 2024 17:59
@lc525 lc525 merged commit 1b367d7 into fix.dataflow.kafka-streams-state-cleanup Feb 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants