Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos: Expose/manage SessionToken #192

Open
bartelink opened this issue Feb 4, 2020 · 1 comment
Open

Cosmos: Expose/manage SessionToken #192

bartelink opened this issue Feb 4, 2020 · 1 comment

Comments

@bartelink
Copy link
Collaborator

The default CosmosDb consistency level (Session) involves round-tripping a SessionToken value between the outcome of a given request through to its successors(s) in order to achieve Read-Your-Writes.

Necessary steps off the top of my head:

  • grabbing (probably inside the stored proc too?), the token from the response
  • propagating it (likely stashing it in the Cosmos.Token alongside the etag etc, although the way the DocDb client holds the value will probably be sufficient in this local case) outward with the response
  • exposing it in the processing context for both Query and Transact options (similarly to how the Version is exposed to QueryEx; if it's to go there, it likely makes sense to provide a Context record bearing both of those - having Version available for the Transact side is currently not covered)

cc @thednaz

@bartelink bartelink modified the milestones: 3.0, 2.0 Feb 4, 2020
@bartelink bartelink modified the milestones: 2.0, 3.0 Feb 19, 2020
@bartelink
Copy link
Collaborator Author

related: Azure/azure-cosmos-dotnet-v3#1945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant