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

Investigate misuses of `buildVersionedRequests` from `cluster_command_helpers` that incorrectly use the database version protocol

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing

      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.

      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. However, I suspect that there are other misuses of this function.

      SERVER-101621 temporarily prevented these misuses from versioning the command. However, we should inspect each case and either use the correct routing information or avoid calling this function to version the command. After that, we can add a tassert with stricter guarantees when this function is called.

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

              Created:
              Updated: