Consider that removeShardStatus response may reach the max BSON size

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The output of reamoveShardStatus may reach the maximum BSON size (BSONObjMaxUserSize) if a draining shard has lots of collections.

      In case of reaching this limit, the affected document will be truncated and we'll add extra info to that document to notify that it has been truncated.

      These will be the fields attached to a truncated document for a draining shard:

      • "totalNumOfDatabases"
      • "totalNumOfShardedCollections"
      • "totalNumOfUnshardedCollections"
      • "truncated": boolean field set to true
      • "note": a human-readable explanation about why the current document has been truncated.

      This is how a truncated document would look like:

      {
         "shard": "shard5",
      
         "databasesWithShardAsPrimary": [ ... ],
         "unshardedCollections": [ ... ],
         "shardedCollections": [ ... ],
      
         "totalNumOfDatabasesWithShardAsPrimary": 2,
         "totalNumOfShardedCollections": 4000,
         "totalNumOfUnshardedCollections: 5000,
         "truncated": true, 
         "note": "The output has been truncated due to too many databases/collections"
      }

            Assignee:
            Unassigned
            Reporter:
            Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: