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: avoid panic when Metadata.RefreshFrequency is 0 #2329

Merged
merged 1 commit into from
Sep 15, 2022
Merged

fix: avoid panic when Metadata.RefreshFrequency is 0 #2329

merged 1 commit into from
Sep 15, 2022

Conversation

napallday
Copy link
Contributor

In #1578 , RefreshFrequency is used to initialize a ticker to periodically check whether to trigger a rebalance.
However, once it is set to 0, it would cause panic when calling pause := time.NewTicker(c.config.Metadata.RefreshFrequency), as shown in #1999.

When RefreshFrequency is 0, there is no backgroundMetadataUpdater to periodically refresh metadata. Thus, there is no need for loopCheckPartitionNumbers as well.

@napallday
Copy link
Contributor Author

hi master @dnwe, I noticed one FVT failed and I found the error log was *** Test killed with quit: ran too long (16m0s).
I believe it's irrelevant to this commit. Could you help retry it? Thanks a lot!

@dnwe dnwe added the fix label Sep 15, 2022
Copy link
Collaborator

@dnwe dnwe left a comment

Choose a reason for hiding this comment

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

Thanks, good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants