Search before asking
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
When a tablet server receives a NotifyLeaderAndIsr request for a bucket with no elected leader (leaderId == null), the original code threw a STORAGE_EXCEPTION. The coordinator then marked that replica as offline via replicasOnOffline. Since isReplicaOnline() excludes replicas in the offline set, subsequent elections could never select these replicas as leader — causing a permanent no-leader state.
Solution
Replace the error branch with a guard condition (leaderId != null && leaderId >= 0). When no valid leader exists, skip fetcher setup silently and let the next LeaderAndIsr notification recover naturally.
Are you willing to submit a PR?
Search before asking
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
When a tablet server receives a
NotifyLeaderAndIsrrequest for a bucket with no elected leader (leaderId == null), the original code threw aSTORAGE_EXCEPTION. The coordinator then marked that replica as offline viareplicasOnOffline. SinceisReplicaOnline()excludes replicas in the offline set, subsequent elections could never select these replicas as leader — causing a permanent no-leader state.Solution
Replace the error branch with a guard condition (
leaderId != null && leaderId >= 0). When no valid leader exists, skip fetcher setup silently and let the nextLeaderAndIsrnotification recover naturally.Are you willing to submit a PR?