TableBucketStateMachine should consider NonExistentBucket as a valid previous state
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 625
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 97
Description
`com.alibaba.fluss.server.coordinator.TableManagerITCase#testPartitionedTableManagement` has many ERROR logs that reporting
```
5017 [coordinator-event-thread] ERROR com.alibaba.fluss.server.coordinator.statemachine.TableBucketStateMachine [] - Table bucket TableBucket{tableId=0, partitionId=0, bucket=0, tablePath=db1.tb1_YEAR, partition=2025} should be one of [OnlineBucket, NewBucket, OfflineBucket] states before moving to OfflineBucket state. Instead it is in NonExistentBucket.
5018 [coordinator-event-thread] ERROR com.alibaba.fluss.server.coordinator.statemachine.TableBucketStateMachine [] - Fail to change state for table bucket TableBucket{tableId=0, partitionId=0, bucket=0, tablePath=db1.tb1_YEAR, partition=2025} from NonExistentBucket to OfflineBucket.
5018 [coordinator-event-thread] ERROR com.alibaba.fluss.server.coordinator.statemachine.TableBucketStateMachine [] - Table bucket TableBucket{tableId=0, partitionId=0, bucket=0, tablePath=db1.tb1_YEAR, partition=2025} should be one of [OnlineBucket, NewBucket, OfflineBucket] states before moving to OnlineBucket state. Instead it is in NonExistentBucket.
5018 [coordinator-event-thread] ERROR com.alibaba.fluss.server.coordinator.statemachine.TableBucketStateMachine [] - Fail to change state for table bucket TableBucket{tableId=0, partitionId=0, bucket=0, tablePath=db1.tb1_YEAR, partition=2025} from NonExistentBucket to OnlineBucket.
```
This is similar to https://github.com/alibaba/fluss/issues/764
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with com.alibaba.fluss.server.coordinator.statemachine.TableBucketStateMachine and the TableManagerITCase#testPartitionedTableManagement test. Reproduce the reported ERROR logs and trace the transition from NonExistentBucket to OfflineBucket or OnlineBucket. Done means the test no longer reports these invalid-state transition errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100