Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3067

Investigate changes in SERVER-62563: Support sharding for collectionUUID parameter of aggregate command

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Original Downstream Change Summary

      for sharded aggregation command, we allow the collectionUUID parameter for only $indexStats and $collStats aggregation pipelines

      Description of Linked Ticket

      Currently the collectionUUID option for the aggregate command is disallowed on mongos.

       

      Context change:

      In the case of sharded collection, documents can be spanned to multiple shards, so the aggregation request can be directed to any subset of the shards, and if the targeted subset doesn't include the primaryShard of the database that may result in not finding the collection corresponding to the given collectionUUID.

      To solve this problem we came up with two solutions:
      1- Send dummy request to the primaryShard if the targeted shard subset doesn't include it and we didn't find the collection corresponding to the given collectionUUID.

      2- Only allow collectionUUID parameter for commands that it must hit the primaryShard.

       

      We have decided to go with the second solution for sharded aggregation command, so we are going to allow the collectionUUID parameter for only $indexStats and $collStats aggregation pipelines as replicator only needs these two pipelines. 
       

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: