Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34074

Make a helper function to compute atClusterTime for a set of shards

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding 2018-04-09

      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.

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: