This is an automated email from the ASF dual-hosted git repository.
swuferhong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git
The following commit(s) were added to refs/heads/main by this push:
new 5ddb97d5a [server] Fix flaky
RebalanceManagerITCase.testBuildClusterModel (#3306)
5ddb97d5a is described below
commit 5ddb97d5a38a1d68f3b1009ec33b974ad7ac85e0
Author: Kaixuan Duan <[email protected]>
AuthorDate: Tue Jun 2 11:32:20 2026 +0800
[server] Fix flaky RebalanceManagerITCase.testBuildClusterModel (#3306)
* [server] Fix flaky RebalanceManagerITCase.testBuildClusterModel
* Trigger CI
---
.../apache/fluss/server/coordinator/rebalance/RebalanceManager.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/fluss-server/src/main/java/org/apache/fluss/server/coordinator/rebalance/RebalanceManager.java
b/fluss-server/src/main/java/org/apache/fluss/server/coordinator/rebalance/RebalanceManager.java
index 253070c7c..1a722ff4d 100644
---
a/fluss-server/src/main/java/org/apache/fluss/server/coordinator/rebalance/RebalanceManager.java
+++
b/fluss-server/src/main/java/org/apache/fluss/server/coordinator/rebalance/RebalanceManager.java
@@ -362,7 +362,11 @@ public class RebalanceManager {
List<Integer> assignment =
coordinatorContext.getAssignment(tableBucket);
Optional<LeaderAndIsr> bucketLeaderAndIsrOpt =
coordinatorContext.getBucketLeaderAndIsr(tableBucket);
- checkArgument(bucketLeaderAndIsrOpt.isPresent(), "Bucket leader
and isr is empty.");
+ // Skip the bucket if leader and ISR information is not available
yet
+ // This can happen during table creation when leader election is
not completed
+ if (!bucketLeaderAndIsrOpt.isPresent()) {
+ continue;
+ }
LeaderAndIsr isr = bucketLeaderAndIsrOpt.get();
int leader = isr.leader();
// Skip the bucket if it is in a transient state (e.g., during
table creation)