[SERVER-51170] Ensure database refreshes are performed after ShardingState initialization Created: 28/Sep/20  Updated: 29/Oct/23  Resolved: 02/Oct/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.2.9
Fix Version/s: 4.9.0, 4.2.15, 4.4.7

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2
Steps To Reproduce:
Sprint: Sharding 2020-10-05
Participants:
Linked BF Score: 65

 Description   

Commands that requires sharding infrastructure to run will be executed only after Grid::setShardingInitialized() is called, the problem is that by that time the shardingState is not already being initialized. Commands that triggers refreshes of the CatalogCache, will trigger this invariant while trying to run forcePrimaryDatabaseRefreshAndWaitForReplication.



 Comments   
Comment by Githook User [ 31/May/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-51170 Ensure database refreshes are performed after ShardingState initialization
Branch: v4.2
https://github.com/mongodb/mongo/commit/eb43e20229bdb20abdcaca1d89b965a22ac44584

Comment by Githook User [ 31/May/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-51170 Ensure database refreshes are performed after ShardingState initialization
Branch: v4.4
https://github.com/mongodb/mongo/commit/092b9724b6c11e43a9642bd8f8283a8c1850909c

Comment by Githook User [ 02/Oct/20 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-51170 Ensure database refreshes are performed after ShardingState initialization
Branch: master
https://github.com/mongodb/mongo/commit/45637f4d481c8badd6d5a2d95dcb8ae947c78c92

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