kafka_neu-1778570057504.zip-extract/kafka-4.2.0-src/docs/operations/eligible-leader-replicas.md

Path
kafka_neu-1778570057504.zip-extract/kafka-4.2.0-src/docs/operations/eligible-leader-replicas.md
Status
scanned
Type
file
Name
eligible-leader-replicas.md
Extension
.md
Programming language

      
    
Mime type
text/plain
File type
exported SGML document, ASCII text, with very long lines
Tag

      
    
Rootfs path

      
    
Size
3070 (3.0 KB)
MD5
17b8570227690a284b95402d843b438a
SHA1
f7034bcd90667d76f8708470b36588faeb8c5478
SHA256
93b56453a1f2dc75216c7b3c05a49eced95cb7bfe51d1c0a302492e42acb4c49
SHA512

      
    
SHA1_git
8876231af8703864c729303a3ff10e59ed828850
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
eligible-leader-replicas.md | 3.0 KB |

--- title: Eligible Leader Replicas description: Eligible Leader Replicas weight: 12 tags: ['kafka', 'docs'] aliases: keywords: type: docs --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> ## Overview Starting from Apache Kafka 4.0, Eligible Leader Replicas ([KIP-966 Part 1](https://cwiki.apache.org/confluence/x/mpOzDw)) is available for the users to an improvement to Kafka replication (ELR is enabled by default on new clusters starting 4.1). As the "strict min ISR" rule has been generally applied, which means the high watermark for the data partition can't advance if the size of the ISR is smaller than the min ISR(`min.insync.replicas`), it makes some replicas that are not in the ISR safe to become the leader. The KRaft controller stores such replicas in the PartitionRecord field called `Eligible Leader Replicas`. During the leader election, the controller will select the leaders with the following order: * If ISR is not empty, select one of them. * If ELR is not empty, select one that is not fenced. * Select the last known leader if it is unfenced. This is a similar behavior prior to the 4.0 when all the replicas are offline. ## Upgrade & Downgrade The ELR is not enabled by default for 4.0. To enable the new protocol on the server, set `eligible.leader.replicas.version=1`. After that the upgrade, the KRaft controller will start tracking the ELR. Downgrades are safe to perform by setting `eligible.leader.replicas.version=0`. ## Tool The ELR fields can be checked through the API DescribeTopicPartitions. The admin client can fetch the ELR info by describing the topics. Note that when the ELR feature is enabled: * The cluster-level `min.insync.replicas` config will be added if there is not any. The value is the same as the static config in the active controller. * The removal of `min.insync.replicas` config at the cluster-level is not allowed. * If the cluster-level `min.insync.replicas` is updated, even if the value is unchanged, all the ELR state will be cleaned. * The previously set `min.insync.replicas` value at the broker-level config will be removed. Please set at the cluster-level if necessary. * The alteration of `min.insync.replicas` config at the broker-level is not allowed. * If `min.insync.replicas` is updated for a topic, the ELR state will be cleaned.
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
23.85
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 19 19
https://cwiki.apache.org/confluence/x/mpOzDw 31 31