[Improvement] Support configurable unclean election for offline bucket recovery
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 625
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 97
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
### Motivation
When a leader replica fails `NotifyLeaderAndIsr`, the Coordinator marks the replica offline and attempts a clean leader election.
Clean election only selects a live replica from the current ISR. If all ISR replicas repeatedly fail leader activation, the bucket can remain in `leader = -1` indefinitely, even when another live replica in the assignment is capable of becoming leader.
Currently, recovery mainly depends on subsequent cluster events or a Coordinator restart, which can retrigger leader election. This makes recovery unreliable for long-lived leaderless buckets.
The existing offline-leader retry mechanism also operates on offline replicas and may include ordinary follower `NotifyLeaderAndIsr` failures. Recovery should instead be scoped precisely to leaderless or offline buckets.
### Solution
_No response_
### Anything else?
_No response_
### Willingness to contribute
- [x] I'm willing to submit a PR!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.