Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
Fully Compatible
-
ALL
-
Sharding 2018-04-09, Sharding 2018-04-23
Description
The writes to the logical session collection should be majority writes, so that updates can survive rollbacks.
Currently the reads for the existence of those records are primary required and local. That may be fine, or we may want to do causally consistent reads or majority reads.
We need to ensure that updates stick, but should be fine reading any data after the write we just did. After the initial document insert, any amount of staleness we could see involves rolled back endSessions calls, rolled back deletions from the ttl index or not yet majority written updates to the time stamp. Any of that staleness can only cause you to delay garbage collection, which is acceptable.
We probably also want to set a maxTimeMillis at that point (to avoid perpetual hangs).