Skip to content

[Improvement] Support configurable unclean election for offline bucket recovery #3894

Description

@swuferhong

Search before asking

  • I searched in the 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

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions