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

CollectionShardingState::getMetadata needs atClusterTime

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Sharding
    • Sharding 2018-04-23

      Today CollectionShardingState::getMetadata reads atClusterTime from repl::ReadConcernArgs::get(opCtx).getArgsAtClusterTime(). This may not be ideal so we should find an alternative way to get the cluster time.
      Instead the implementation should use OperationShardingState to keep the atClusterTime it may be set in service_entry_point_common after validating.
      The original value of atClusterTime in the readConcernArgs should be protected from being used to avoid having two possibly diverging versions. I suggest to put a sentinel value that will trigger an invariant on read.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            martin.neupauer@mongodb.com Martin Neupauer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: