-
Type: Bug
-
Resolution: Declined
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Cluster Scalability
-
ALL
-
v8.0, v7.3, v7.0, v6.0
More specifically the following sequence of events leads to the crash:
1. As part of the rs->shardedCluster procedure, a node restarts with --shardsvr and becomes the new primary, but addShard is not run yet.
2. An insert is run on collection X.
3. Since the node just restarted, the node will not have any collection metadata for X. As a result, when the insert attempts to get the collection metadata, it will fail and attempt to throw a StaleConfig.
4. The server then crashes, because to create the StaleConfig error, a ShardId is expected but the replica set was not added as a shard yet.
See BF-33248 for the full stacktrace.