-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 8.0.0-rc8
-
Component/s: None
-
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)