Skip to content

Commit 8f7ac21

Browse files
committed
address comments
1 parent e759fcb commit 8f7ac21

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

articles/cosmos-db/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,8 @@
913913
href: how-to-manage-consistency.md
914914
- name: Configure conflict resolution policies
915915
href: how-to-manage-conflicts.md
916+
- name: Convert session token format
917+
href: how-to-convert-session-token.md
916918
- name: Provisioned throughput
917919
items:
918920
- name: Provision throughput on a container

articles/cosmos-db/how-to-convert-session-token.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ ms.author: vitrinh
1313
This article explains how to convert between different session token formats to ensure compatibility between SDK versions.
1414

1515
> [!NOTE]
16-
> By default, the SDK keeps track of the session token automatically and it will use the most recent session token. For more information, please visit [Utilize session tokens](how-to-manage-consistency.md#utilize-session-tokens). This article only applies to the following conditions:
17-
> * The Azure Cosmos DB account has Session consistency
18-
> * The session tokens are managed manually
19-
> * Multiple versions of the SDK are used at the same time
16+
> By default, the SDK keeps track of the session token automatically and it will use the most recent session token. For more information, please visit [Utilize session tokens](how-to-manage-consistency.md#utilize-session-tokens). The instructions in this article only apply with the following conditions:
17+
> * Your Azure Cosmos DB account uses Session consistency.
18+
> * You are managing the session tokens are manually.
19+
> * You are using multiple versions of the SDK at the same time.
2020
2121
## Session token formats
2222

23-
There are two session token formats: **simple** and **vector**. These two formats are not interchangeable and will need to be converted when passing to the client with different versions.
23+
There are two session token formats: **simple** and **vector**. These two formats are not interchangeable so, the format should be converted when passing to the client application with different versions.
2424
- The **simple** session token format is used by the .NET SDK V1
2525
- The **vector** session token format is used by the .NET SDK V2.
2626

@@ -41,6 +41,7 @@ To pass a session token to client using .NET SDK V1, use a **simple** session to
4141
private static readonly char[] SegmentSeparator = (new[] { '#' });
4242
private static readonly char[] PkRangeSeparator = (new[] { ':' });
4343

44+
// sessionTokenToConvert = session token from previous response
4445
string[] items = sessionTokenToConvert.Split(PkRangeSeparator, StringSplitOptions.RemoveEmptyEntries);
4546
string[] sessionTokenSegments = items[1].Split(SessionTokenHelpers.SegmentSeparator, StringSplitOptions.RemoveEmptyEntries);
4647

0 commit comments

Comments
 (0)