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

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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Sharding
    • None
    • Sharding 2018-04-09

    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.

      Attachments

        Activity

          People

            misha.tyulenev@mongodb.com Misha Tyulenev
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: