[SERVER-34276] CollectionShardingState::getMetadata needs atClusterTime Created: 03/Apr/18  Updated: 27/Oct/23  Resolved: 29/Oct/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Martin Neupauer Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding
Sprint: Sharding 2018-04-23
Participants:

 Description   

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.



 Comments   
Comment by Kaloian Manassiev [ 29/Oct/18 ]

I think we should close that one as Won't Fix. There is not much value in transferring the atClusterTime to the OSS since they both correspond to the OperationContext anyways.

Generated at Thu Feb 08 04:36:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.