Skip to content

Commit fcb893b

Browse files
committed
DOC-3091 Clarify ACK waits for persistence to disk only when using WAITAOF
1 parent 0a5fbf1 commit fcb893b

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

content/operate/rs/clusters/optimize/wait.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,17 @@ acknowledged within the replica. These are steps 7 and 8.
3535

3636
## Blocking write operation on replication
3737

38-
With the `WAIT` command, applications can ask to wait for
38+
With the [`WAIT`]({{<relref "/commands/wait">}}) or [`WAITAOF`]({{<relref "/commands/waitaof">}}) commands, applications can ask to wait for
3939
acknowledgments only after replication or persistence is confirmed on
40-
the replica. The flow of a write operation with the WAIT command is:
40+
the replica. The flow of a write operation with `WAIT` or `WAITAOF` is:
4141

4242
1. The application issues a write.
4343
1. The proxy communicates with the correct primary shard in the system that contains the given key.
4444
1. Replication communicates the update to the replica shard.
45-
1. The replica persists the update to disk if the AOF every write setting is selected.
45+
1. If using `WAITAOF` and the AOF every write setting, the replica persists the update to disk before sending the acknowledgment.
4646
1. The acknowledgment is sent back from the replica all the way to the proxy with steps 5 to 8.
4747

48-
With this flow, the application only gets the acknowledgment from the
49-
write after durability is achieved with replication to the replica and to
50-
the persistent storage.
48+
The application only gets the acknowledgment from the write after durability is achieved with replication to the replica for `WAIT` or `WAITAOF` and to the persistent storage for `WAITAOF` only.
5149

5250
{{< image filename="/images/rs/strong-consistency.png" >}}
5351

content/operate/rs/databases/durability-ha/consistency.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,17 @@ Any updates that are issued to the database are typically performed with the fol
3232

3333
## Blocking write operation on replication
3434

35-
With the `WAIT` command, applications can ask to wait for
35+
With the [`WAIT`]({{<relref "/commands/wait">}}) or [`WAITAOF`]({{<relref "/commands/waitaof">}}) commands, applications can ask to wait for
3636
acknowledgments only after replication or persistence is confirmed on
37-
the replica. The flow of a write operation with the `WAIT` command is:
37+
the replica. The flow of a write operation with `WAIT` or `WAITAOF` is:
3838

3939
1. The application issues a write.
4040
2. The proxy communicates with the correct primary shard in the system that contains the given key.
4141
3. Replication communicates the update to the replica shard.
42-
4. The replica persists the update to disk if the AOF every write setting is selected.
42+
4. If using `WAITAOF` and the AOF every write setting, the replica persists the update to disk before sending the acknowledgment.
4343
5. The acknowledgment is sent back from the replica all the way to the proxy with steps 5 to 8.
4444

45-
With this flow, the application only gets the acknowledgment from the
46-
write after durability is achieved with replication to the replica and to
47-
the persistent storage.
45+
The application only gets the acknowledgment from the write after durability is achieved with replication to the replica for `WAIT` or `WAITAOF` and to the persistent storage for `WAITAOF` only.
4846

4947
{{< image filename="/images/rs/strong-consistency.png" >}}
5048

0 commit comments

Comments
 (0)