-
Type:
Improvement
-
Resolution: Works as Designed
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Change streams
-
None
-
Query Execution
-
QE 2025-01-20
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In file cluster_check_metadata_consistency_cmd.cpp, in method _runClusterLevel, we call a helper function getAllDbPrimaryShards here.
For all shards that this function returns, we create a request object.
This function currently unconditionally returns the config shardId, caused by this code.
The _runClusterLevel then unconditionally adds a connection to the config shardId again a few lines later here.
As a result, we create multiple cursors to the config shard when running this command.
This seems unnecessary.
We should change it so that only one cursor is opened for the config shard.