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

[BALANCER] Fix ShuffleTweaker logic error that cause multiple replicas at one broker #1770

Merged

Conversation

garyparrot
Copy link
Collaborator

這個 PR 修正 #1656 帶來的錯誤,該 PR 的修正讓 ShuffleTweaker 的操作粒度從一個 partition 一次,變成一個 replica 一次,其 replica list alteration 的實作有一段程式碼會基於 stale state 做搬移決策:

https://github.com/skiptests/astraea/blob/28ec2c6882c2fad0fffc7367d16e458dbd2e091c/common/src/main/java/org/astraea/common/balancer/tweakers/ShuffleTweaker.java#L134

這始得 ShuffleTweaker 有機會產生出不正常的 replica list,如把兩個同個 partition 的 replica,放到同個節點上。

@garyparrot garyparrot self-assigned this May 23, 2023
@garyparrot garyparrot changed the title [BALANCER] Fix ShuffleTweaker duplicate replica issue [BALANCER] Fix ShuffleTweaker logic error that cause multiple replicas at one broker May 23, 2023
@garyparrot
Copy link
Collaborator Author

Flaky test #1771

@chia7712
Copy link
Contributor

麻煩修正衝突喔

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.

LGTM

@garyparrot garyparrot merged commit 124a096 into opensource4you:main May 27, 2023
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