This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch 4.1
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/4.1 by this push:
new cdc7a4e2b73 MINOR: improve the min.insync.replicas doc (#20237)
cdc7a4e2b73 is described below
commit cdc7a4e2b737a614259003028984fce76d6337e7
Author: Luke Chen <[email protected]>
AuthorDate: Tue Aug 5 00:22:13 2025 +0800
MINOR: improve the min.insync.replicas doc (#20237)
Along with the change: https://github.com/apache/kafka/pull/17952
([KIP-966](https://cwiki.apache.org/confluence/display/KAFKA/KIP-966%3A+Eligible+Leader+Replicas)),
the semantics of `min.insync.replicas` config has small change, and add
some constraints. We should document them clearly.
Reviewers: Jun Rao <[email protected]>, Calvin Liu <[email protected]>,
Mickael Maison <[email protected]>, Paolo Patierno
<[email protected]>, Federico Valeri <[email protected]>, Chia-Ping
Tsai <[email protected]>
---
.../java/org/apache/kafka/common/config/TopicConfig.java | 3 ++-
docs/ops.html | 13 ++++++++++---
docs/upgrade.html | 2 ++
.../kafka/controller/ConfigurationControlManager.java | 2 +-
4 files changed, 15 insertions(+), 5 deletions(-)
diff --git
a/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
b/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
index 08fad453568..77c476b4946 100755
--- a/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
+++ b/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
@@ -181,7 +181,8 @@ public class TopicConfig {
"When used together, <code>min.insync.replicas</code> and
<code>acks</code> allow you to enforce greater durability guarantees. " +
"A typical scenario would be to create a topic with a replication
factor of 3, " +
"set <code>min.insync.replicas</code> to 2, and produce with
<code>acks</code> of \"all\". " +
- "This will ensure that a majority of replicas must persist a write
before it's considered successful by the producer and it's visible to
consumers.";
+ "This ensures that a majority of replicas must persist a write before
it's considered successful by the producer and it's visible to consumers." +
+ "<p>Note that when the Eligible Leader Replicas feature is enabled,
the semantics of this config changes. Please refer to <a
href=\"#eligible_leader_replicas\">the ELR section</a> for more info.</p>";
public static final String COMPRESSION_TYPE_CONFIG = "compression.type";
public static final String COMPRESSION_TYPE_DOC = "Specify the final
compression type for a given topic. " +
diff --git a/docs/ops.html b/docs/ops.html
index 529bce159bb..be0bfe89e8b 100644
--- a/docs/ops.html
+++ b/docs/ops.html
@@ -4499,9 +4499,16 @@ $ bin/kafka-topics.sh --create --topic tieredTopic
--bootstrap-server localhost:
<p>Downgrades are safe to perform by setting
<code>eligible.leader.replicas.version=0</code>.</p>
<h4 class="anchor-heading"><a id="eligible_leader_replicas_tool"
class="anchor-link"></a><a href="#eligible_leader_replicas_tool">Tool</a></h4>
- <p>The ELR fields can be checked through the API DescribeTopicPartitions.
The admin client can fetch the ELR info by describing the topics.
- Also note that, if <code>min.insync.replicas</code> is updated for a
topic, the ELR field will be cleaned. If cluster default min ISR is updated,
- all the ELR fields will be cleaned.</p>
+ <p>The ELR fields can be checked through the API DescribeTopicPartitions.
The admin client can fetch the ELR info by describing the topics.</p>
+ <p>Note that when the ELR feature is enabled:</p>
+ <ul>
+ <li>The cluster-level <code>min.insync.replicas</code> config will be
added if there is not any. The value is the same as the static config in the
active controller.</li>
+ <li>The removal of <code>min.insync.replicas</code> config at the
cluster-level is not allowed.</li>
+ <li>If the cluster-level <code>min.insync.replicas</code> is updated, even
if the value is unchanged, all the ELR state will be cleaned.</li>
+ <li>The previously set <code>min.insync.replicas</code> value at the
broker-level config will be removed. Please set at the cluster-level if
necessary.</li>
+ <li>The alteration of <code>min.insync.replicas</code> config at the
broker-level is not allowed.</li>
+ <li>If <code>min.insync.replicas</code> is updated for a topic, the ELR
state will be cleaned.</li>
+ </ul>
</script>
diff --git a/docs/upgrade.html b/docs/upgrade.html
index 1be3a20faa7..0b4017eca78 100644
--- a/docs/upgrade.html
+++ b/docs/upgrade.html
@@ -48,6 +48,8 @@
</li>
<li>
The KIP-966 part 1: Eligible Leader Replicas(ELR) will
be enabled by default on the new clusters.
+ After the ELR feature enabled, the previously set
<code>min.insync.replicas</code> value at the broker-level config will be
removed.
+ Please set at the cluster-level if necessary.
For further details, please refer to <a
href="/{{version}}/documentation.html#eligible_leader_replicas">here</a>.
</li>
</ul>
diff --git
a/metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
b/metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
index b367fda8114..d64695bd39b 100644
---
a/metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
+++
b/metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java
@@ -613,7 +613,7 @@ public class ConfigurationControlManager {
/**
* Generate any configuration records that are needed to make it safe to
enable ELR.
- * Specifically, we need to remove all cluster-level configurations for
min.insync.replicas,
+ * Specifically, we need to remove all broker-level configurations for
min.insync.replicas,
* and create a cluster-level configuration for min.insync.replicas. It is
always safe to call
* this function if ELR is already enabled; it will simply do nothing if
the necessary
* configurations already exist.