问题
Let's assume I have two documents in the same collection/partition, both at "version 1": A1
, B1
.
I update A1
-> A2
, the write operation returns a session token SA
.
Using SA
to read document A
will guarantee I get version A2
.
Now I update B1
-> B2
, and get a new session token SB
.
Using SB
to read document B
will guarantee I get version B2
.
My question is:
does using token SB
guarantee I can see older writes as well?
I.e. will reading reading A
with token SB
always get me A2
?
回答1:
Yes. In your case SB > SA and hence it will ensure latest version of A.
来源:https://stackoverflow.com/questions/45032389/documentdb-does-a-newer-session-token-guarantee-reading-back-older-writes