Skip to content

Commit b16160b

Browse files
committed
correct cp guarantee wording
1 parent 964cbd5 commit b16160b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

articles/cosmos-db/consistency-levels.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: sidandrews
66
ms.reviewer: mjbrown
77
ms.service: cosmos-db
88
ms.topic: conceptual
9-
ms.date: 02/17/2022
9+
ms.date: 09/26/2022
1010
ms.custom: cosmos-db-video
1111
---
1212
# Consistency levels in Azure Cosmos DB
@@ -31,8 +31,6 @@ Each level provides availability and performance tradeoffs. The following image
3131

3232
:::image type="content" source="./media/consistency-levels/five-consistency-levels.png" alt-text="Consistency as a spectrum" border="false" :::
3333

34-
The consistency levels are region-agnostic and are guaranteed for all operations regardless of the region from which the reads and writes are served, the number of regions associated with your Azure Cosmos account, or whether your account is configured with a single or multiple write regions.
35-
3634
## Consistency levels and Azure Cosmos DB APIs
3735

3836
Azure Cosmos DB provides native support for wire protocol-compatible APIs for popular databases. These include MongoDB, Apache Cassandra, Gremlin, and Azure Table storage. When using Gremlin API and Table API, the default consistency level configured on the Azure Cosmos account is used. For details on consistency level mapping between Cassandra API or the API for MongoDB and Azure Cosmos DB's consistency levels see, [Cassandra API consistency mapping](cassandra/apache-cassandra-consistency-mapping.md) and [API for MongoDB consistency mapping](mongodb/consistency-mapping.md).
@@ -105,11 +103,11 @@ Clients outside of the session performing writes will see the following guarante
105103

106104
### Consistent prefix consistency
107105

108-
In consistent prefix option, updates that are returned contain some prefix of all the updates, with no gaps. Consistent prefix consistency level guarantees that reads never see out-of-order writes.
106+
In consistent prefix, updates made as single document writes see eventual consistency. Updates made as a batch within a transaction, are returned consistent to the transaction in which they were committed. Write operations within a transaction of multiple documents are always visible together.
109107

110-
If writes were performed in the order `A, B, C`, then a client sees either `A`, `A,B`, or `A,B,C`, but never out-of-order permutations like `A,C` or `B,A,C`. Consistent Prefix provides write latencies, availability, and read throughput comparable to that of eventual consistency, but also provides the order guarantees that suit the needs of scenarios where order is important.
108+
Assume two write operations are performed on documents Doc1 and Doc2, within transactions T1 and T2. When client does a read in any replica, the user will see either “Doc1 v1 and Doc2 v1” or “ Doc1 v2 and Doc2 v2”, but never “Doc1 v1 and Doc2 v2” or “Doc1 v2 and Doc2 v1” for the same read or query operation.
111109

112-
Below are the consistency guarantees for Consistent Prefix:
110+
Below are the consistency guarantees for Consistent Prefix within a transaction context (single document writes see eventual consistency):
113111

114112
- Consistency for clients in same region for an account with single write region = [Consistent Prefix](#consistent-prefix-consistency)
115113
- Consistency for clients in different regions for an account with single write region = [Consistent Prefix](#consistent-prefix-consistency)

0 commit comments

Comments
 (0)