IntermediateInternals
What is unclean leader election and why is it dangerous?
Reference answer
Unclean leader election (unclean.leader.election.enable, default false) allows a replica that is not in the ISR to be elected leader as a last resort when no in-sync replica is available. It keeps the partition available, but the elected replica's log becomes the source of truth even though it is not guaranteed to have every committed message, so committed messages can be lost, risking data loss. Kafka's design documentation calls this a tradeoff between availability and consistency: waiting for an ISR replica keeps data consistent, but the partition remains unavailable as long as those replicas are down. A common approach for data where loss is not acceptable is to leave it disabled.
Expected key concepts: unclean leader election, unclean.leader.election.enable, ISR, last resort, committed messages, availability, consistency, source of truth, data loss, default false
How did that feel?
Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.