...
The kafka-leader-election.sh tool will be upgraded to allow manual leader election.
It can directly select a leader.
It can trigger an unclean recovery for the replica with the longest log in either Aggressive or Balance mode.
- Configs to update. Please refer to the Config Changes section
- unclean.recovery.strategy. Described in the above section. Balanced is the default value.
- unclean.recovery.manager.enabled. True for using the unclean recovery manager to perform an unclean recovery. False otherwise. False is the default value.
- unclean.recovery.timeout.ms. The time limits of waiting for the replicas' response during the Unclean Recovery. 5 min is the default value.
- unclean.leader.election.enable.false -> unclean.recovery.strategy.Balanced
- unclean.leader.election.enable.true -> unclean.recovery.strategy.Aggressive
...
CleanShutdownFile (Coming with ELR)
It will be a JSON file.
|
ElectLeadersRequest (Coming with Unclean Recovery)
...
Limit: 20 topics per request. If more than 20 topics are included, only the first 20 will be served. Others will be returned with DesiredLeadersInvalidRequestError.
|
...
Limit: 2000 partitions per request. If more than 2000 partitions are included, only the first 2000 will be served. Others will be returned with InvalidRequestError.
|
GetReplicaLogInfo Response
{ "apiKey":70, "type": "response", "name": "GetReplicaLogInfoResponse", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "BrokerEpoch", "type": "int64", "versions": "0+", "about": "The epoch for the broker." } { "name": "TopicPartitionLogInfoList", "type": "[]TopicPartitionLogInfo", "versions": "0+", "about": "The list of the log info.", "fields": [ { "name": "TopicId", "type": "uuid", "versions": "0+", "ignorable": true, "about": "The unique topic ID."}, |
kafka-leader-election.sh (Coming with Unclean Recovery)
|
Config changes
The new configs are introduced for Unclean Recovery.
- unclean.recovery.strategy. Described in the above section. Balanced is the default value.
- unclean.recovery.manager.enabled. True for using the unclean recovery manager to perform an unclean recovery. False means the random election will be used in the unclean leader election. False is the default value.
- unclean.recovery.timeout.ms. The time limits of waiting for the replicas' response during the Unclean Recovery. 5 min is the default value.
Metrics
The following metrics will be added for ELR
...