-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
CAR Team 2024-11-11, CAR Team 2024-11-25
Implement the aggregation stage $aggregateClusterCatalog as an alias of the following pipeline (used to return the default values):
[ { $_internalListCollections: {} }, { $lookup: { from: { db: "config", coll: "collections" }, localField: "_id", foreignField: "name", as: "trackedCollectionInfo" }}, { $addFields: { "sharded": { $and: [ {$ne: ["$trackedCollectionInfo", []]}, {$ne: [{$first: "$trackedCollectionInfo.unsplittable"}, true]} ] } }}, { $addFields: { "shardKey": { $cond: { if: "$sharded", then: {$first: "$trackedCollectionInfo.key"}, else: "$$REMOVE" } } }} ]
In addition, the aggregation stage will also return additional values if they are requested through the stage specifications.
These are the extra fields that will be returned if the specified parameter is introduced:
PARAMETER INTRODUCED | OPTIONAL FIELD | TYPE |
{shards: 1} | shards | array of strings |
{zoneRanges: 1} | zoneRanges | (opt) array of BSON |
{chunksInfo:1} | chunks | (opt) array of BSON |
{chunksInfo:1} | chunkSize | (opt) int |
{balancingConfiguration: 1} | balancingEnabled | (opt) boolean |
{balancingConfiguration: 1} | autoMergingEnabled | (opt) boolean |
{tracked: 1} | tracked | bool |
- depends on
-
SERVER-96212 Create a new aggregation stage called $_internalListCollections
- Closed
- is depended on by
-
SERVER-92960 Enable the new $aggregateClusterCatalog agg stage on a replicaset/standalone cluster
- Open
-
SERVER-97508 Evaluate test coverage for the $aggregateClusterCatalog stage
- Open
-
SERVER-86421 Implement command to know which unsharded collections can be moved
- Backlog
-
SERVER-89883 removeShard should hint about how to move data of tracked unsharded collections
- Open