Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-99354

Avoid multiple connections to shardSvr's config shard in cluster_check_metadata_consistency.cpp

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 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.

            Assignee:
            jan.steemann@mongodb.com Jan Steemann
            Reporter:
            jan.steemann@mongodb.com Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None