Skip to content

Commit d5e3861

Browse files
authored
Merge pull request #164450 from markjbrown/consistency-over-rides
Add tip about consistency level overrides
2 parents 9b11522 + df63240 commit d5e3861

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

articles/cosmos-db/consistency-levels.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ Read consistency applies to a single read operation scoped within a logical part
3838

3939
You can configure the default consistency level on your Azure Cosmos account at any time. The default consistency level configured on your account applies to all Azure Cosmos databases and containers under that account. All reads and queries issued against a container or a database use the specified consistency level by default. To learn more, see how to [configure the default consistency level](how-to-manage-consistency.md#configure-the-default-consistency-level). You can also override the default consistency level for a specific request, to learn more, see how to [Override the default consistency level](how-to-manage-consistency.md?#override-the-default-consistency-level) article.
4040

41+
> [!TIP]
42+
> Overriding the default consistency level only applies to reads within the SDK client. An account configured for strong consistency by default will still write and replicate data synchronously to every region in the account. When the SDK client instance or request overrides this with Session or weaker consistency, reads will be performed using a single replica. See [Consistency levels and throughput](consistency-levels.md#consistency-levels-and-throughput) for more details.
43+
4144
> [!IMPORTANT]
4245
> It is required to recreate any SDK instance after changing the default consistency level. This can be done by restarting the application. This ensures the SDK uses the new default consistency level.
4346

articles/cosmos-db/how-to-manage-consistency.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: Manage consistency in Azure Cosmos DB
33
description: Learn how to configure and manage consistency levels in Azure Cosmos DB using Azure portal, .NET SDK, Java SDK and various other SDKs
4-
author: anfeldma-ms
4+
author: markjbrown
55
ms.service: cosmos-db
66
ms.subservice: cosmosdb-sql
77
ms.topic: how-to
8-
ms.date: 06/10/2020
9-
ms.author: anfeldma
8+
ms.date: 07/02/2021
9+
ms.author: mjbrown
1010
ms.custom: devx-track-js, devx-track-csharp, devx-track-azurecli, devx-track-azurepowershell
1111
---
1212

@@ -60,7 +60,10 @@ Update-AzCosmosDBAccount -ResourceGroupName $resourceGroupName `
6060
Clients can override the default consistency level that is set by the service. Consistency level can be set on a per request, which overrides the default consistency level set at the account level.
6161

6262
> [!TIP]
63-
> Consistency can only be **relaxed** at the request level. To move from weaker to stronger consistency, update the default consistency for the Cosmos account.
63+
> Consistency can only be **relaxed** at the SDK instance or request level. To move from weaker to stronger consistency, update the default consistency for the Cosmos account.
64+
65+
> [!TIP]
66+
> Overriding the default consistency level only applies to reads within the SDK client. An account configured for strong consistency by default will still write and replicate data synchronously to every region in the account. When the SDK client instance or request overrides this with Session or weaker consistency, reads will be performed using a single replica. See [Consistency levels and throughput](consistency-levels.md#consistency-levels-and-throughput) for more details.
6467
6568
### <a id="override-default-consistency-dotnet"></a>.NET SDK
6669

0 commit comments

Comments
 (0)