[SERVER-34074] Make a helper function to compute atClusterTime for a set of shards Created: 22/Mar/18  Updated: 29/Mar/18  Resolved: 29/Mar/18

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

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Misha Tyulenev
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-33027 compute atClusterTime Closed
Sprint: Sharding 2018-04-09
Participants:

 Description   

This logic is implemented in several places of cluster_find and cluster_aggregate

    if (isSnapshotRead) {
        std::set<ShardId> shardIds = {shardId};
        atClusterTime = computeAtClusterTime(opCtx, shardIds);
        bool isSameShardIds = verifyTargetedShardsAtClusterTime(opCtx, shardIds, atClusterTime);
        if (!isSameShardIds) {  // use the current clusterTime if chunks moved
            atClusterTime = LogicalClock::get(opCtx)->getClusterTime();
        }
    }

Build a helper to keep it in one place.


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