Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
The controller automatically triggers a preferred leader election every N minutes. It tries to elect all preferred leaders of partitions without doing some basic checks like whether the leader is in sync.
This leads to a multitude of errors which cause confusion:
April 14th 2020, 17:01:11.015 [Controller id=0] Partition TOPIC-9 failed to complete preferred replica leader election to 1. Leader is still 0
April 14th 2020, 17:01:11.002 [Controller id=0] Error completing replica leader election (PREFERRED) for partition TOPIC-9 kafka.common.StateChangeFailedException: Failed to elect leader for partition TOPIC-9 under strategy PreferredReplicaPartitionLeaderElectionStrategy
It would be better if the Controller filtered out some of these elections, not attempt them at all and maybe log an aggregate INFO-level log
Attachments
Issue Links
- links to