-
Type: Task
-
Resolution: Works as Designed
-
Priority: 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.