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 flaky BalancerTest#testLeaderCountRebalance #774

Merged
merged 2 commits into from
Sep 27, 2022

Conversation

garyparrot
Copy link
Collaborator

@garyparrot garyparrot commented Sep 27, 2022

resolve #750

出錯的原因是 SkewedPartitionScenario 在把 log 分佈套用到叢集時,只等待一秒鐘當作工作完成,但是實際上這個過程可能會花上不少時間。太快呼叫的結果導致後面重新選舉 leader 時觸發 PreferredLeaderNotAvailableException 錯誤。

修正的方式是用 RebalanceAdmin 裏面的等待功能等特定 log 達到 sync 狀態,而非單純等 1 秒鐘。

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@garyparrot 感謝如此快的修復,+1

@garyparrot garyparrot merged commit 8bdf342 into opensource4you:main Sep 27, 2022
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.

Fix flaky BalancerTest#testLeaderCountRebalance
2 participants