GeezerVison is showing github.com — KAFKA-20554 Document acks=1 record loss during planned leader transit… · coderbruis/kafka@38faa94
File tree
Expand file treeCollapse file tree
Open diff view settings
clients/src/main/java/org/apache/kafka/clients/producer docs/streams/developer-guide
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -141,6 +141,8 @@ public class ProducerConfig extends AbstractConfig { |
141 | 141 | + " <li><code>acks=1</code> This will mean the leader will write the record to its local log but will respond" |
142 | 142 | + " without awaiting full acknowledgement from all followers. In this case should the leader fail immediately after" |
143 | 143 | + " acknowledging the record but before the followers have replicated it then the record will be lost." |
| 144 | + + " The record may also be lost when leadership moves (e.g., reassignment, preferred-leader election," |
| 145 | + + " or controlled shutdown) if it was acknowledged but not yet replicated to the new leader." |
144 | 146 | + " <li><code>acks=all</code> This means the leader will wait for the full set of in-sync replicas to" |
145 | 147 | + " acknowledge the record. This guarantees that the record will not be lost as long as at least one in-sync replica" |
146 | 148 | + " remains alive. This is the strongest available guarantee. This is equivalent to the acks=-1 setting." |
|
Collapse file
Copy file name to clipboardExpand all lines: docs/streams/developer-guide/config-streams.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -273,7 +273,7 @@ Increasing the replication factor to 3 ensures that the internal Kafka Streams t |
273 | 273 | > The number of acknowledgments that the leader must have received before considering a request complete. This controls the durability of records that are sent. The possible values are: |
274 | 274 | > |
275 | 275 | > * `acks="0"` The producer does not wait for acknowledgment from the server and the record is immediately added to the socket buffer and considered sent. No guarantee can be made that the server has received the record in this case, and the producer won't generally know of any failures. The offset returned for each record will always be set to `-1`. |
276 | | -> * `acks="1"` The leader writes the record to its local log and responds without waiting for full acknowledgement from all followers. If the leader immediately fails after acknowledging the record, but before the followers have replicated it, then the record will be lost. |
| 276 | +> * `acks="1"` The leader writes the record to its local log and responds without waiting for full acknowledgement from all followers. If the leader immediately fails after acknowledging the record, but before the followers have replicated it, then the record will be lost. The record may also be lost when leadership moves (e.g., reassignment, preferred-leader election, or controlled shutdown) if it was acknowledged but not yet replicated to the new leader. |
277 | 277 | > * `acks="all"` (default since 3.0 release) The leader waits for the full set of in-sync replicas to acknowledge the record. This guarantees that the record will not be lost if there is at least one in-sync replica alive. This is the strongest available guarantee. |
278 | 278 | > |
279 | 279 |
|
|