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

`buildVersionedRequests` from `cluster_command_helpers` is incorrectly using the database version protocol

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-03-17

      This function consults the routing information to build requests for a specified list of shards and attaches the `dbVersion` to all shards if there is no routing table in the chunk manager. However, it does not check for incorrect usage of this API.

      While the function correctly handles shard version, the issue arises when using the database version protocol. It should only append the `dbVersion` if there is exactly one shard and it is the primary shard according to the routing information.

      Currently, we have identified at least one misuse of this function: when `mergeShardId` is selected as the config server, but the routing information is taken from a different database. This scenario occurs through the `$listClusterCatalog` aggregation.

      [Edit] Aim of this ticket: bypass (not version the command) when the targeted shard does not correspond to the primary database shard from the routing information. This unblocks SERVER-100036.

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: