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

Topic creator is too brittle during new cluster construction #399

Open
otterley opened this issue Sep 12, 2018 · 3 comments
Open

Topic creator is too brittle during new cluster construction #399

otterley opened this issue Sep 12, 2018 · 3 comments

Comments

@otterley
Copy link

I'm building an automated test suite for some broker maintenance automation involving multiple brokers. As part of this test suite, I'm building a three-broker Kafka cluster, and desire to create a topic with a replication factor of three.

Since the brokers are started by a container scheduler, they're not necessarily all started at the same time. However, the topic creator script is run in the background immediately after a broker is started. If there aren't yet enough brokers in the cluster, the topic creator will fail hard with:

creating topics: test:1:3
Error while executing topic command : Replication factor: 3 larger than available brokers: 2.

What I'd like to happen is for the topic-creator to wait for the broker count to reach the desired replication factor before attempting to create the topic, or to retry until successful.

@otterley otterley changed the title Topic creator should retry during new cluster construction Topic creator is too brittle during new cluster construction Sep 12, 2018
@sscaling
Copy link
Collaborator

I'm building an automated test suite for some broker maintenance automation involving multiple brokers.

I would have thought the broker maintenance automation should deal with topic creation / deletion / alteration?

Even so - there is some merit in making this less brittle, but on the other hand, for production use-cases it is likely you would want to manage topics outside of the create topics helper script. There are issues such as not being able to co-ordinate each broker trying to create topics concurrently which creates un-necessary errors.

@sscaling
Copy link
Collaborator

Related to (very) old PR #160

@masoncj
Copy link

masoncj commented Feb 13, 2020

Just came here to say I ran into this recently in a single broker setup. Is there a suggested path forward to avoid this error where topic creation happens before broker has completely started up?

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

No branches or pull requests

3 participants