[SERVER-71299] Fail startup if no ClusterId is found Created: 14/Nov/22  Updated: 29/Oct/23  Resolved: 15/Nov/22

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

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2022-11-14, Sharding EMEA 2022-11-28
Participants:

 Description   

Config server generates and persists a new ClusterId on first startup and every other node load this Cluster ID from the config server at startup using the ClusterIdentityLoader .

The problem is that currently in case no config version document is found on the config server at startup the ClusterIdentityLoader will load a fake zero-filled OID.
This is wrong and can bring to unexpected error when we later try to add a shard.

Instead we should make ClusterIdentityLoader::loadClusterId() to simply fail if no config version document is found on the config server.



 Comments   
Comment by Githook User [ 15/Nov/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-71299 Fail startup if no ClusterId is found
Branch: master
https://github.com/mongodb/mongo/commit/6c8ec9595894baa6ea0e3b87ad7b43be10906dba

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