You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "clarkwtc (via GitHub)" <gi...@apache.org> on 2025/02/23 08:23:00 UTC
[PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
clarkwtc opened a new pull request, #19016:
URL: https://github.com/apache/kafka/pull/19016
Follow-up https://github.com/apache/kafka/pull/18880
Add "strict min ISR" description to improve MIN_IN_SYNC_REPLICAS_DOC
Before
<img width="1537" alt="Screenshot 2025-02-23 at 4 18 25 PM" src="https://github.com/user-attachments/assets/b5263fcf-86c5-465a-92b5-996107742a8e" />
After
<img width="1551" alt="Screenshot 2025-02-23 at 4 16 37 PM" src="https://github.com/user-attachments/assets/506014c7-9ee0-4f87-a302-2c20eb2db5a4" />
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970582069
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -172,13 +172,15 @@ public class TopicConfig {
public static final String MIN_IN_SYNC_REPLICAS_CONFIG = "min.insync.replicas";
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.";
+ "a write for the write to be considered successful. If <code>acks=0</code>, the message may be committed asynchronously; " +
Review Comment:
Do we need to talk about acks=0 or acks=1 here? They are not related to min.insync.replicas, right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970799319
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -172,13 +172,15 @@ public class TopicConfig {
public static final String MIN_IN_SYNC_REPLICAS_CONFIG = "min.insync.replicas";
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.";
+ "a write for the write to be considered successful. If <code>acks=0</code>, the message may be committed asynchronously; " +
Review Comment:
Sorry, you're right. They are not related here.
I've fixed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #19016:
URL: https://github.com/apache/kafka/pull/19016
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1967651167
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -178,7 +178,13 @@ public class TopicConfig {
"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.";
+ "if a majority of replicas do not receive a write.<br> " +
+ "Topics have a setting for <code>min.insync.replicas</code> that is checked when the producer requests acknowledgment " +
+ "that a message has been written to all in-sync replicas. " +
+ "If <code>acks=0</code>, the message may be committed asynchronously; if <code>acks=1</code>, " +
+ "it’s committed synchronously on the leader.<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.";
Review Comment:
I updated the new version to move it to the definition stage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1972478682
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerTopicConfigSynonyms.java:
##########
@@ -78,6 +78,7 @@ public final class ServerTopicConfigSynonyms {
sameNameWithLogPrefix(TopicConfig.CLEANUP_POLICY_CONFIG),
sameName(TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG),
sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG),
+ sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_DOC),
Review Comment:
You can reference `MIN_IN_SYNC_REPLICAS_DOC` directly, as it's the documentation. `sameName` is typically used to add synonyms for configurations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1966975592
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -171,14 +171,20 @@ public class TopicConfig {
public static final String MIN_IN_SYNC_REPLICAS_CONFIG = "min.insync.replicas";
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.";
+ "this configuration specifies the minimum number of replicas that must acknowledge " +
Review Comment:
I think the IDE automatically formats this file.
I have fixed it.
Thank you for your comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1967025162
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -178,7 +178,13 @@ public class TopicConfig {
"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.";
+ "if a majority of replicas do not receive a write.<br> " +
+ "Topics have a setting for <code>min.insync.replicas</code> that is checked when the producer requests acknowledgment " +
+ "that a message has been written to all in-sync replicas. " +
+ "If <code>acks=0</code>, the message may be committed asynchronously; if <code>acks=1</code>, " +
+ "it’s committed synchronously on the leader.<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.";
Review Comment:
But we need to introduce this at the definition stage versus at the end.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1967648190
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -178,7 +178,13 @@ public class TopicConfig {
"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.";
+ "if a majority of replicas do not receive a write.<br> " +
+ "Topics have a setting for <code>min.insync.replicas</code> that is checked when the producer requests acknowledgment " +
+ "that a message has been written to all in-sync replicas. " +
+ "If <code>acks=0</code>, the message may be committed asynchronously; if <code>acks=1</code>, " +
+ "it’s committed synchronously on the leader.<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.";
Review Comment:
Thank you for your comment.
Exactly, there are some repeated descriptions in the existing documentation, which I have removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970906033
##########
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, " +
Review Comment:
Actually, this is not quite correct since it applies independently of the acks setting. Marking this as resolved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1972555921
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerTopicConfigSynonyms.java:
##########
@@ -78,6 +78,7 @@ public final class ServerTopicConfigSynonyms {
sameNameWithLogPrefix(TopicConfig.CLEANUP_POLICY_CONFIG),
sameName(TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG),
sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG),
+ sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_DOC),
Review Comment:
I was going the wrong way.
Sure, we can directly reference `MIN_IN_SYNC_REPLICAS_DOC`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970616675
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -172,13 +172,15 @@ public class TopicConfig {
public static final String MIN_IN_SYNC_REPLICAS_CONFIG = "min.insync.replicas";
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.";
+ "a write for the write to be considered successful. If <code>acks=0</code>, the message may be committed asynchronously; " +
Review Comment:
agree. We should remove acks=0 or acks=1 since the key points have been documented.
```
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 <code>min.insync.replicas</code> condition is met.<br>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on PR #19016:
URL: https://github.com/apache/kafka/pull/19016#issuecomment-2686608878
I pushed a very minor tweak.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970794134
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java:
##########
@@ -136,14 +136,16 @@ 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\"), " +
Review Comment:
This is a good point.
Directly referencing `TopicConfg` using `ServerTopicConfigSynonyms.serverSynonym` is a beautiful way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970904949
##########
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, " +
Review Comment:
"this configuration specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful and for it to become visible to the consumers."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1967024797
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -178,7 +178,13 @@ public class TopicConfig {
"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.";
+ "if a majority of replicas do not receive a write.<br> " +
+ "Topics have a setting for <code>min.insync.replicas</code> that is checked when the producer requests acknowledgment " +
+ "that a message has been written to all in-sync replicas. " +
+ "If <code>acks=0</code>, the message may be committed asynchronously; if <code>acks=1</code>, " +
+ "it’s committed synchronously on the leader.<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.";
Review Comment:
This seems to be repeating what was already described in the existing documentation. Only the last two lines seem to be new information.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1967648190
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -178,7 +178,13 @@ public class TopicConfig {
"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.";
+ "if a majority of replicas do not receive a write.<br> " +
+ "Topics have a setting for <code>min.insync.replicas</code> that is checked when the producer requests acknowledgment " +
+ "that a message has been written to all in-sync replicas. " +
+ "If <code>acks=0</code>, the message may be committed asynchronously; if <code>acks=1</code>, " +
+ "it’s committed synchronously on the leader.<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.";
Review Comment:
Exactly, there are some repeated descriptions in the existing documentation, which I have removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970576760
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java:
##########
@@ -136,14 +136,16 @@ 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\"), " +
Review Comment:
Hmm, is there a reason why this cannot reference the definition in `TopicConfig`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1971049031
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerTopicConfigSynonyms.java:
##########
@@ -78,6 +78,7 @@ public final class ServerTopicConfigSynonyms {
sameNameWithLogPrefix(TopicConfig.CLEANUP_POLICY_CONFIG),
sameName(TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG),
sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG),
+ sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_DOC),
Review Comment:
This change is made because we can reference `MIN_IN_SYNC_REPLICAS_DOC` from TopicConfig in ServerLogConfigs.
If we don't do it, it will got `Caused by: java.util.NoSuchElementException: No server synonym found for MIN_IN_SYNC_REPLICAS_DOC`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1971104486
##########
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 <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 the producer raises an exception if a majority of replicas do not receive a write.<br> ";
Review Comment:
It's quite clear.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970909999
##########
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 <code>min.insync.replicas</code> condition is met.<br> " +
Review Comment:
Nit: Please add "the" before <code>min.insync.replicas</code>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1971049031
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerTopicConfigSynonyms.java:
##########
@@ -78,6 +78,7 @@ public final class ServerTopicConfigSynonyms {
sameNameWithLogPrefix(TopicConfig.CLEANUP_POLICY_CONFIG),
sameName(TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG),
sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG),
+ sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_DOC),
Review Comment:
This change is made because we can reference `MIN_IN_SYNC_REPLICAS_DOC` from `TopicConfig` in `ServerLogConfigs`.
If we don't do it, it will got `Caused by: java.util.NoSuchElementException: No server synonym found for MIN_IN_SYNC_REPLICAS_DOC`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970794134
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java:
##########
@@ -136,14 +136,16 @@ 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\"), " +
Review Comment:
This is a good point.
Directly referencing TopicConfg using `ServerTopicConfigSynonyms.serverSynonym` is a beautiful way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1972555921
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerTopicConfigSynonyms.java:
##########
@@ -78,6 +78,7 @@ public final class ServerTopicConfigSynonyms {
sameNameWithLogPrefix(TopicConfig.CLEANUP_POLICY_CONFIG),
sameName(TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG),
sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG),
+ sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_DOC),
Review Comment:
I was going the wrong way.
Sure, we can directly reference MIN_IN_SYNC_REPLICAS_DOC.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1967651167
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -178,7 +178,13 @@ public class TopicConfig {
"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.";
+ "if a majority of replicas do not receive a write.<br> " +
+ "Topics have a setting for <code>min.insync.replicas</code> that is checked when the producer requests acknowledgment " +
+ "that a message has been written to all in-sync replicas. " +
+ "If <code>acks=0</code>, the message may be committed asynchronously; if <code>acks=1</code>, " +
+ "it’s committed synchronously on the leader.<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.";
Review Comment:
I updated the new version to move to the definition stage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on PR #19016:
URL: https://github.com/apache/kafka/pull/19016#issuecomment-2678448907
I found the same description of "min.insync.replicas" in TopicConfig and ServerLogConfig.
I have already updated both files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970909685
##########
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 <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 the producer raises an exception if a majority of replicas do not receive a write.<br> ";
Review Comment:
Perhaps:
"This will ensure that a majority of replicas must persist a write before it's considered successful by the producer and it's seen by consumers."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #19016:
URL: https://github.com/apache/kafka/pull/19016#issuecomment-2687190842
cherry-pick to 4.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1970902496
##########
server-common/src/main/java/org/apache/kafka/server/config/ServerTopicConfigSynonyms.java:
##########
@@ -78,6 +78,7 @@ public final class ServerTopicConfigSynonyms {
sameNameWithLogPrefix(TopicConfig.CLEANUP_POLICY_CONFIG),
sameName(TopicConfig.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG),
sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_CONFIG),
+ sameName(TopicConfig.MIN_IN_SYNC_REPLICAS_DOC),
Review Comment:
Why did we make this change?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1971123972
##########
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 <code>min.insync.replicas</code> condition is met.<br> " +
Review Comment:
Thank you for your patience.
I've fixed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1966970684
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -171,14 +171,20 @@ public class TopicConfig {
public static final String MIN_IN_SYNC_REPLICAS_CONFIG = "min.insync.replicas";
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.";
+ "this configuration specifies the minimum number of replicas that must acknowledge " +
Review Comment:
could you please fix the indent?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-18849: Add "strict min ISR" to the docs of "min.insync.replicas" [kafka]
Posted by "clarkwtc (via GitHub)" <gi...@apache.org>.
clarkwtc commented on code in PR #19016:
URL: https://github.com/apache/kafka/pull/19016#discussion_r1967648190
##########
clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java:
##########
@@ -178,7 +178,13 @@ public class TopicConfig {
"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.";
+ "if a majority of replicas do not receive a write.<br> " +
+ "Topics have a setting for <code>min.insync.replicas</code> that is checked when the producer requests acknowledgment " +
+ "that a message has been written to all in-sync replicas. " +
+ "If <code>acks=0</code>, the message may be committed asynchronously; if <code>acks=1</code>, " +
+ "it’s committed synchronously on the leader.<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.";
Review Comment:
Thank you for your comment.
Exactly, there are some repeated descriptions in the documentation, which I have removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org