Skip to content
Kafka Is FunProgress

IntermediateInternals

What is unclean leader election and why is it dangerous?

Reference answer

Unclean leader election (unclean.leader.election.enable=true) allows a non-ISR replica to become leader when there are no ISR replicas available. This prevents the partition from going offline but GUARANTEES data loss — the elected replica is out-of-sync and any messages it missed are permanently lost. It also allows two replicas to briefly believe they are leader (split-brain during the election window). For financial data, orders, or any critical data: NEVER enable unclean election. Prefer partition unavailability over silent data loss.

Expected key concepts: unclean leader election, non-ISR, out-of-sync, data loss, split-brain, partition offline, permanently lost, financial data, unavailability