Skip to content

Cosmos: Expose/manage SessionToken #192

Description

@bartelink

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions