Skip to content

Conversation

@swuferhong
Copy link
Contributor

Purpose

Linked issue: #1397

Brief change log

Tests

API and Format

Documentation

@swuferhong swuferhong marked this pull request as draft August 3, 2025 08:11
@swuferhong swuferhong force-pushed the rebalance-plan branch 9 times, most recently from 061ed6b to 6bf4aca Compare August 6, 2025 03:54
@polyzos polyzos force-pushed the main branch 3 times, most recently from d88c76c to 434a4f4 Compare August 31, 2025 15:13
@swuferhong swuferhong marked this pull request as ready for review September 3, 2025 07:05
@swuferhong swuferhong force-pushed the rebalance-plan branch 3 times, most recently from 967ccb0 to 85341ca Compare September 4, 2025 01:34
@swuferhong swuferhong force-pushed the rebalance-plan branch 3 times, most recently from 60fd7ef to ed3a37a Compare October 23, 2025 08:31
@swuferhong swuferhong force-pushed the rebalance-plan branch 3 times, most recently from 5a0e50b to 995e3d2 Compare January 7, 2026 06:39
} else if (electionStrategy == CONTROLLED_SHUTDOWN_ELECTION) {
if (electionStrategy instanceof DefaultLeaderElection) {
resultOpt =
((DefaultLeaderElection) electionStrategy)
Copy link
Member

Choose a reason for hiding this comment

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

Could you create an issue to refactor ReplicaLeaderElection into interface with method leaderElection?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! #2324

(replica) -> {
// For rebalance case. the replica state already set to null in method
// stopRemovedReplicasOfReassignedBucket. so we need not reset it again.
if (coordinatorContext.getReplicaState(replica) != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that null is a very ambiguous state—would it be better to define a clear, explicit state for use in rebalance scenarios?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

null is not define only for reblance. NonExist will change the state in coordinatorContext to null.

@wuchong wuchong merged commit 7addc72 into apache:main Jan 8, 2026
6 checks passed
@wuchong wuchong linked an issue Jan 8, 2026 that may be closed by this pull request
2 tasks
@wuchong wuchong mentioned this pull request Jan 8, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support execute reblance plan

4 participants