extend strong consistency to the process level instead of instance level
Closed this issue · 4 comments
Currently strong consistency is only supported for operations executed within one state instance (i.e. result of stateLib.init()
). This behavior is guaranteed by Cosmos DB session consistency model.
This can be easily extended to support strong consistency across instances within the same process by storing the cosmos session id into a static variable when initializing the first instance and reusing the same id for subsequent instances.
JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-624
see https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels for general knowledge about consistency levels in cosmosdb
and https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-manage-consistency?tabs=portal%2Cdotnetv2%2Capi-async for managing session consistency
Handled through a better documentation, see https://github.com/adobe/aio-lib-state#adobe-io-state-store-consistency-guarantees
Calling this closed with the doc update.