-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
CAR Team 2024-11-11, CAR Team 2024-11-25, CAR Team 2024-12-09
-
200
Implement the aggregation stage $listClusterCatalog 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
- duplicates
-
SERVER-92960 Enable the new $listClusterCatalog agg stage on a replicaset/standalone cluster
- Closed
- fixes
-
SERVER-86421 Implement command to know which unsharded collections can be moved
- Closed
- is depended on by
-
SERVER-92960 Enable the new $listClusterCatalog agg stage on a replicaset/standalone cluster
- Closed
-
SERVER-97508 Evaluate test coverage for the $listClusterCatalog stage
- Closed
-
SERVER-97636 Return internal databases with $listClusterCatalog
- Closed
-
SERVER-89883 removeShard should hint about how to move data of tracked unsharded collections
- In Code Review
- is related to
-
SERVER-95999 Investigate if $shardedDataDistribution Executed for a Specific Namespace can Require Lower Permissions
- Closed