This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch 4.0
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/4.0 by this push:
     new 2f9da4691fd KAFKA-18849 Add "strict min ISR" to the docs of 
"min.insync.replicas" (#19016)
2f9da4691fd is described below

commit 2f9da4691fdda9745cd7bee9bb9d8c8d3dfba3b1
Author: ClarkChen <[email protected]>
AuthorDate: Thu Feb 27 16:05:24 2025 +0800

    KAFKA-18849 Add "strict min ISR" to the docs of "min.insync.replicas" 
(#19016)
    
    KIP-966 adds strict min ISR rule, so this PR improves the docs of 
min.insync.replicas to include that change.
    
    Reviewers: Ismael Juma <[email protected]>, Chia-Ping Tsai 
<[email protected]>
---
 .../java/org/apache/kafka/common/config/TopicConfig.java    | 13 +++++++------
 .../org/apache/kafka/server/config/ServerLogConfigs.java    | 10 +---------
 2 files changed, 8 insertions(+), 15 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 fb51d254cdd..10d6024163b 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
@@ -173,12 +173,13 @@ public class TopicConfig {
     public static final String MIN_IN_SYNC_REPLICAS_DOC = "When a producer 
sets acks to \"all\" (or \"-1\"), " +
         "this configuration specifies the minimum number of replicas that must 
acknowledge " +
         "a write for the write to be considered successful. If this minimum 
cannot be met, " +
-        "then the producer will raise an exception (either NotEnoughReplicas 
or " +
-        "NotEnoughReplicasAfterAppend).<br>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 the 
producer raises an exception " +
-        "if a majority of replicas do not receive a write.";
+        "then the producer will raise an exception (either 
<code>NotEnoughReplicas</code> or 
<code>NotEnoughReplicasAfterAppend</code>).<br> " +
+        "Regardless of the <code>acks</code> setting, the messages will not be 
visible to the consumers until " +
+        "they are replicated to all in-sync replicas and the 
<code>min.insync.replicas</code> condition is met.<br> " +
+        "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.";
 
     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/server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java
 
b/server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java
index fa7ed93850f..ac11be948ad 100644
--- 
a/server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java
+++ 
b/server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java
@@ -135,15 +135,7 @@ public class ServerLogConfigs {
 
     public static final String MIN_IN_SYNC_REPLICAS_CONFIG = 
ServerTopicConfigSynonyms.serverSynonym(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG);
     public static final int MIN_IN_SYNC_REPLICAS_DEFAULT = 1;
-    public static final String MIN_IN_SYNC_REPLICAS_DOC = "When a producer 
sets acks to \"all\" (or \"-1\"), " +
-            "<code>min.insync.replicas</code> specifies the minimum number of 
replicas that must acknowledge " +
-            "a write for the write to be considered successful. If this 
minimum cannot be met, " +
-            "then the producer will raise an exception (either 
<code>NotEnoughReplicas</code> or " +
-            "<code>NotEnoughReplicasAfterAppend</code>).<br>When used 
together, <code>min.insync.replicas</code> and acks " +
-            "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 acks of \"all\". This will ensure that the producer 
raises an exception " +
-            "if a majority of replicas do not receive a write.";
+    public static final String MIN_IN_SYNC_REPLICAS_DOC = 
TopicConfig.MIN_IN_SYNC_REPLICAS_DOC;
 
     public static final String CREATE_TOPIC_POLICY_CLASS_NAME_CONFIG = 
"create.topic.policy.class.name";
     public static final String CREATE_TOPIC_POLICY_CLASS_NAME_DOC = "The 
create topic policy class that should be used for validation. The class should 
" +

Reply via email to