Skip to content

[server] Fix flaky RebalanceManagerITCase.testBuildClusterModel#3306

Merged
swuferhong merged 2 commits into
apache:mainfrom
Kaixuan-Duan:issue-3063-unstable-rebalance-test
Jun 2, 2026
Merged

[server] Fix flaky RebalanceManagerITCase.testBuildClusterModel#3306
swuferhong merged 2 commits into
apache:mainfrom
Kaixuan-Duan:issue-3063-unstable-rebalance-test

Conversation

@Kaixuan-Duan
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #3063

Brief change log

  • Modified RebalanceManager.buildClusterModel() method to gracefully handle buckets without LeaderAndIsr information
  • Replaced the strict checkArgument with a conditional continue statement
  • Added explanatory comments about the transient state handling

This change addresses the race condition that occurs during table creation when leader election is not yet completed. The fix allows the rebalance manager to skip buckets in transient states rather than failing the entire operation.

Tests

./mvnw -pl fluss-server \
-Dtest='RebalanceManagerITCase#testBuildClusterModel' \
-DfailIfNoTests=false \
test

API and Format

Documentation

@Kaixuan-Duan
Copy link
Copy Markdown
Contributor Author

The reason for CI failure seems to be a known flaky test #2974 .

@Kaixuan-Duan Kaixuan-Duan force-pushed the issue-3063-unstable-rebalance-test branch from 3e43692 to 456c356 Compare June 1, 2026 16:55
@Kaixuan-Duan
Copy link
Copy Markdown
Contributor Author

@swuferhong Hi, could you please help review this PR when you have time?
Thanks!

Copy link
Copy Markdown
Contributor

@swuferhong swuferhong left a comment

Choose a reason for hiding this comment

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

LGTM

@swuferhong swuferhong merged commit 5ddb97d into apache:main Jun 2, 2026
7 checks passed
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.

[test] Unstable test RebalanceManagerITCase.testBuildClusterModel

2 participants