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

Extend the response of $listCollections with additional fields

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • CAR Team 2024-08-05, CAR Team 2024-08-19, CAR Team 2024-09-02

      The $listCollections aggregations stage will return additional fields to the default ones (defined on SERVER-92216).

      Users will be able to choose those additional fields by setting optional fields to the request. This table show the additional fields returned per every optional parameter:
       

      PARAMETER REQUESTED OPTIONAL FIELD TYPE DESCRIPTION
      {shards: 1} shards array of strings Shards per collection
      {zoneRanges: 1} zoneRanges (opt) array of BSON The zone configuration of the collection.
      Only present if the collection is sharded.
      {chunksInfo:1} chunks (opt) array of BSON The chunks of that collection.
      Only present if the collection is sharded.
      {chunksInfo:1} chunkSize (opt) int The chunkSize of the collection.
      Only present if the collection is sharded.
      {balancingConfiguration: 1} balancingEnabled (opt) boolean Specifies if the balancing is enabled for that collection.
      It will be true if the noBalance field for that collection isn’t true. Only present if the collection is sharded.
      {balancingConfiguration: 1} autoMergingEnabled (opt) boolean Specifies if the auto merger is enabled for that collection.
      It will be true if the autoMerger field for that collection isn’t false.
      It won’t take into consideration the balancer active windows. Only present if the collection is sharded.
      {tracked: 1} tracked bool Tells if the collection is currently tracked in the cluster catalog.
      This option should not be exposed to the public documentation since we don’t want users to know what unsharded collections are tracked.

       

            Assignee:
            silvia.surroca@mongodb.com Silvia Surroca
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: