[SERVER-64601] Shard server mongod initialization is not run after File Copy Based Initial Sync Created: 17/Mar/22  Updated: 29/Oct/23  Resolved: 09/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc6, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Sergi Mateo Bellido
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File fcbis-sharding-bug.patch    
Issue Links:
Backports
Depends
depends on SERVER-65251 FCBIS doesn't call to the onInitialSy... Closed
depends on SERVER-64627 Need general method to handle in-memo... Closed
is depended on by SERVER-66016 Create passthroughs for FCBIS on live... Closed
Related
related to SERVER-66082 Ensure that cluster parameters are ap... Closed
related to SERVER-64627 Need general method to handle in-memo... Closed
related to SERVER-64628 More testing of adding nodes to shard... Closed
is related to SERVER-58935 Turn File Copy Based Initial Sync on ... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Steps To Reproduce:

fcbis-sharding-bug.patch
./buildscripts/resmoke.py run --storageEngine=wiredTiger --storageEngineCacheSizeGB=.50 --suite=sharding jstests/sharding/fcbis-sharding.js --log=file
Need to have built with enterprise support for FCBIS.

Sprint: Sharding EMEA 2022-04-18, Sharding EMEA 2022-05-02, Sharding EMEA 2022-05-16
Participants:
Linked BF Score: 124

 Description   

initializeGlobalShardingStateForMongoD has to be run on shardsvrs during initialization. Currently, this is triggered from the following places:
1) In initAndListen
2) In ShardServerOpObserver::onInserts when an insert of the shard identity document is observed.

For FCBIS however, this does not work: On a new member that will undergo initial sync, point (1) will not find the shard identity document at all. Later, point (2) will not be triggered because FCBIS does not perform inserts like logical initial sync would.
As a result, after FCBIS has completed, the shard is left with uninitialized sharding state.



 Comments   
Comment by Githook User [ 09/May/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-64601 Using the onInitialDataAvailable hook to initialize
sharding environment

(cherry picked from commit bf1b133adecc94af8d932170dca6361484946499)
Branch: v6.0
https://github.com/mongodb/mongo/commit/d66184cb6e4be8e7ce848d69f675b9bae01091f3

Comment by Githook User [ 06/May/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-64601 Using the onInitialDataAvailable hook to initialize
sharding environment
Branch: master
https://github.com/mongodb/mongo/commit/bf1b133adecc94af8d932170dca6361484946499

Comment by Githook User [ 06/May/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-64601 Changing TODOs
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/fa9af89c066766d024ecd238e17c44babf27a8b5

Generated at Thu Feb 08 06:00:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.