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

Exclude unsharded collections from $shardedDataDistribution's output

    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • CAR Team 2024-07-08, CAR Team 2024-07-22
    • 200

      The $shardedDataDistribution aggregation stage calls into $_internalAllCollectionStats and then filters the results only returning stats for collections tracked in config.collections.

      While in older versions only sharded collections would be tracked in config.collections, starting from v8.0 also some unsharded collections may be tracked, only in case they were moved at least once via moveCollection.

      Purpose of this ticket should be to:

      [OPTION 1] Exclude unsharded collections from $shardedDataDistribution's output.
      OR
      [OPTION 2] Add a sharded boolean flag to collection info returned by $shardedDataDistribution so that callers can differentiate between sharded and tracked unsharded collections.

       

      This ticket should also include a test verifying that unsharded collections are not shown by $shardedDataDistribution.

      ------------------
      UPDATED (07/03/2024)
      We've agreed to go on with OPTION1 (see the comments for more details)

            Assignee:
            laura.mestrestorres@mongodb.com Laura Mestres Torres (Inactive)
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: