[SERVER-47419] Find a better way of setting the shardId when throwing on getCollectionDescription Created: 08/Apr/20  Updated: 29/Oct/23  Resolved: 14/Apr/20

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

Type: Task Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-45781 Throw Stale Shard Version when collec... Closed
is depended on by SERVER-32198 Missing collection metadata on the sh... Closed
is depended on by SERVER-47523 Upsert stage: Convert usage of getCol... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-04-20
Participants:

 Description   

SERVER-45781 introduced the assurance of getting the latest collection description metadata available on the shard. This implies that if the metadata is unknown, then a Stale Shard Version Exception will be thrown. As part of the Exception construction a shardId must be provided. Currently the ServiceContext is being captured at the constructor, which is being used to get the ShardingState, however, there is an invariant that can be hit if for example a server with

--shardsvr

does some operations before being added into a cluster.



 Comments   
Comment by Githook User [ 14/Apr/20 ]

Author:

{'name': 'Marcos José Grillo Ramírez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-47419 Return unsharded on getCollectionDescription if the server is not yet fully initialized
Branch: master
https://github.com/mongodb/mongo/commit/75e46058cad77405b49530acf632c381665222b0

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