[SERVER-36554] computeAtClusterTimeForOneShard should return the latest clusterTime if there is no cached lastCommittedOpTime Created: 09/Aug/18  Updated: 29/Oct/23  Resolved: 10/Aug/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.2

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2018-08-13
Participants:
Linked BF Score: 12

 Description   

computeAtClusterTimeForOneShard is used to select an atClusterTime for requests with snapshot level readConcern targeting a single shard (typically an unsharded collection). Currently it always returns the latest cached lastCommittedOpTime for the targeted shard from the ShardRegistry. The hook that updates this value does not run on all connections though, so it is possible for this value to be null, in which case atClusterTime would be a null logical time, which is not allowed and triggers an invariant.

Instead, if there is no cached value, the function should return the latest in-memory cluster time from the logical clock.



 Comments   
Comment by Githook User [ 10/Aug/18 ]

Author:

{'username': 'jsmulrow', 'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-36554 Make computeAtClusterTimeForOneShard return latest clusterTime if there is no cached last committed opTime
Branch: master
https://github.com/mongodb/mongo/commit/60a9c20ec95c4cceda9413e18334c55bb85fe66e

Generated at Thu Feb 08 04:43:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.