[SERVER-55454] Relax OperationShardingState::initializeClientRoutingVersion _shardVersionsChecked invariant Created: 23/Mar/21  Updated: 29/Oct/23  Resolved: 25/Mar/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: Yoon Soo Kim
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-49228 Remove kickback to mongos requirement... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query Execution 2021-04-05
Participants:
Linked BF Score: 0

 Description   

With the introduction of SERVER-49228 it is possible that we will attempt to register collection sharding state for a views underlying collection more than once, in the case that after the first registration we find that we our config state is uninitialized and need to reload / retry the command. This will trigger an invariant in OperationShardingState::initializeClientRoutingVersion that confirms that the given namespace does not already exist in _shardVersionsChecked.

To address we should relax this invariant to only trigger when the registered collection is also registered as sharded.



 Comments   
Comment by Githook User [ 25/Mar/21 ]

Author:

{'name': 'Yoonsoo Kim', 'email': 'yoonsoo.kim@mongodb.com', 'username': 'yun-soo'}

Message: SERVER-55454 Relax OperationShardingState::initializeClientRoutingVersion _shardVersionsChecked invariant
Branch: master
https://github.com/mongodb/mongo/commit/b79aa28799f52362d88eb7ca32948d2098daa741

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