Affects Version/s: 2.0.0
Fix Version/s: None
After disabling unclean leader leader again after recovery of a situation where we enabled unclean leader due to a split brain in zookeeper, we saw that some of our brokers stopped replicating their partitions.
Digging into the logs, we saw that the replica thread was stopped because one partition had a failure which threw a Error processing data for partition exception. But the broker kept running and serving the partitions from which it was leader.
We saw three different types of exceptions triggering this (example stacktraces attached):
- Trying to roll a new log segment for topic partition partition-b-97 with start offset 1388 while it already exists.
- Kafka scheduler is not running.
We think there are two acceptable ways for the kafka broker to handle this:
- Mark those partitions as a partition with error and handle them accordingly. As is done when a CorruptRecordException or KafkaStorageException is thrown.
- Exit the broker as is done when log truncation is not allowed.
Maybe even a combination of both. Our probably naive idea is that for the first two types the first strategy would be the best, but for the last type, it is probably better to re-throw a FatalExitError and exit the broker.