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

Create removeShardStatus command

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

      Create a new command called removeShardStatus to report those collections and databases that must be moved out from all the draining shards before those shards are completely removed from the sharded cluster.

      In particular, the response must include the following 3 lists of elements per every draining shard:

      • "databasesWithShardAsPrimary": Will contain all the databases whose primary shard is the draining shard.
      • "unshardedCollections": Will contain all the unsharded collections living on the draining shard.
      • "shardedCollections": Will contain all the sharded collections with chunks living on the draining shard. Should include also the balancerStatus of the collection and the number of jumbo chunks on the given shard.

      This is an example of the desired output having 2 shards in draining mode:

      [
        {
          "shard":"atlas-2m11gv-shard-2",
          "databasesWithShardAsPrimary": [
            {
              "name": "aircraft",
              "numberOfCollectionsToMove": 3
            }
          ],
          "shardedCollections": [
            {
              "name": "aircraft.concorde",
              "balancerStatus": "enabled",
              "numberOfJumboChunks": 0
            },
            {
              "name": "aircraft.B787",
              "balancerStatus": "disabled",
              "numberOfJumboChunks": 0
            }
          ],
          "unshardedCollections": [
            {
              "name": "aircraft.A320",
            },
            {
              "name": "airport.DCA",
            },
            {
              "name": "airport.BWI",
            }
          ]
        },
        {
          "shard":"atlas-2m11gv-shard-3",
          "databasesWithShardAsPrimary": [
            {
              "name": "airport",
              "numberOfCollectionsToMove": 4
            }
          ],
          "shardedCollections": [
            {
              "name": "aircraft.concorde",
              "balancerStatus": "enabled",
              "numberOfJumboChunks": 1
            },
            {
              "name": "aircraft.B787",
              "balancerStatus": "disabled",
              "numberOfJumboChunks": 0
            }
          ],
          "unshardedCollections": [
            {
              "name": "airport.EWR",
            },
            {
              "name": "airport.IAD",
            },
          ]
        }
      ]
      
      

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

              Created:
              Updated:
              Resolved: