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

Support readConcern snapshot with atClusterTime in cluster distinct command

    • Fully Compatible
    • Sharding 2018-08-13

      As part of this ticket:

      • Ensure ClusterDistinct supports readConcern level snapshot
      • Ensure ClusterDistinct selects an appropriate atClusterTime based on the shards it targets, and will retry on snapshot errors
      • Add unit tests verifying this works

      Proposed implementation:

      1. Add a supportsReadConcern to ClusterDistinct that always returns true
      2. Update functions in cluster_commands_helpers.cpp to compute atClusterTime and attach it to the generated responses, like in ClusterAggregate (computing atClusterTime with computeAtClusterTime, attaching atClusterTime with appendAtClusterTime)
        • buildVersionedRequestsForTargetedShards here
        • buildUnversionedRequestsForShards here
      3. snapshot errors are already retried in strategy.cpp, so there should be no work there
      4. Add unit test verify requests sent by ClusterDistinct contain appropriate atClusterTimes and are retried on snapshot errors, like the existing ClusterFind tests

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: