Chia-Ping Tsai created KAFKA-21110:
--------------------------------------
Summary: Document that min.insync.replicas is bounded by the
replica count
Key: KAFKA-21110
URL: https://issues.apache.org/jira/browse/KAFKA-21110
Project: Kafka
Issue Type: Improvement
Reporter: Chia-Ping Tsai
Assignee: Chia-Ping Tsai
{code:java}
public static final String MIN_IN_SYNC_REPLICAS_CONFIG =
"min.insync.replicas";
public static final String MIN_IN_SYNC_REPLICAS_DOC = "Specifies the
<i>minimum</i> number of in-sync replicas (including the leader) " +
"required for a write to succeed when a producer sets <code>acks</code>
to \"all\" (or \"-1\"). In the <code>acks=all</code> " +
"case, every in-sync replica must acknowledge a write for it to be
considered successful. E.g., if a topic has " +
"<code>replication.factor</code> of 3 and the ISR set includes all
three replicas, then all three replicas must acknowledge an " +
"<code>acks=all</code> write for it to succeed, even if
<code>min.insync.replicas</code> happens to be less than 3. " +
"If <code>acks=all</code> and the current ISR set contains fewer than
<code>min.insync.replicas</code> members, 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 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=\"https://kafka.apache.org/documentation/#eligible_leader_replicas\">the
ELR section</a> for more info.</p>";
{code}
Since 3.7.0 (#14594, part of KIP-966), the broker uses
{{min(min.insync.replicas, replica count)}} as the effective min ISR. This
applies to both {{acks=all}} produce requests and the high watermark
advancement, and it is not related to whether ELR is enabled.
The current doc does not mention this, and it still says the producer gets
{{NotEnoughReplicas}} when the ISR is smaller than {{{}min.insync.replicas{}}}.
The ELR note also implies the semantics change with ELR, but the ELR section
only covers config management rules ...
--
This message was sent by Atlassian Jira
(v8.20.10#820010)