-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Sharding NYC
The snapshot transactions' atClusterTime selection algorithm developed as part of the Global Point in Time reads project for 4.0 works as follows:
- Perform routing using the latest available routing table on MongoS
- Using the per-shard majority committed timestamp, select the smallest timestamp across the targeted shards (this is in order to ensure none of the targeted shards will perform a no-op write)
- Perform routing at the timestamp selected in the previous step and if this results in the same set of shards, use the selected timestamp. Otherwise use the latest available timestamp on the logical clock
This algorithm was disabled through SERVER-34326 (and deleted by SERVER-34475) due to the small window of history that the storage engine supports. Now that SERVER-31767 has increased the window of timestamps available for atClusterTime reads, the above selection algorithm can be re-enabled.
In addition, using the majority committed timestamp goes against the performance goals of the speculative snapshot optimization and can also lead to problems on shards with enableMajorityReadConcern=false (where such shards may never provide a snapshot at the selected atClusterTime). Because of this, the algorithm should be changed to use the last applied opTime timestamps of the targeted shards.
- has to be done after
-
SERVER-35707 Figure out the transaction abort state on re-targeting exceptions
- Closed
- has to be done before
-
SERVER-37549 Compute atClusterTime for sharded transactions using lastApplied opTime timestamps of targeted shards
- Closed
- is duplicated by
-
SERVER-37549 Compute atClusterTime for sharded transactions using lastApplied opTime timestamps of targeted shards
- Closed
- is related to
-
SERVER-33053 Allow unsharded connections to trigger EgressMetadataHook::readReplyMetadata through ShardingConnectionHook
- Backlog
-
SERVER-37568 computeAtClusterTimeForOneShard should always return the latest logical clock time
- Closed