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

sh.status/printShardingStatus should show config servers (ie. configdb)

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Diagnostics, Shell
    • None
    • Sharding

    Description

      sh.status() lists useful config db metadata, such as config version, shards, databases, chunks, etc. However, it doesn't say where this data is actually coming from.

      In the case where configDB isn't passed to printShardingStatus and defaults to "config", it would be useful to also run db.serverCmdLineOpts() and pull out parsed.sharding.configDB (or parsed.configdb if that doesn't exist (for pre-2.6)), and then if this exists display it alongside the other sharding-related info, eg:

       --- Sharding Status ---
         sharding version: { "_id" : 1, "version" : 3 }
      +  configdb:
      +    host.local:27020,host.local:27021,host.local:27022
         shards:
           {  "_id" : "shard0000",  "host" : "host.local:27018" }
           {  "_id" : "shard0001",  "host" : "host.local:27019" }
         databases:
           {  "_id" : "admin",  "partitioned" : false,  "primary" : "config" }
           {  "_id" : "test",  "partitioned" : true,  "primary" : "shard0000" }
               test.test
                   shard key: { "x" : 1 }
                   chunks:
                       shard0000   1
                   { "x" : { "$minKey" : 1 } } -->> { "x" : { "$maxKey" : 1 } } on : shard0000 Timestamp(1, 0)
      

      Attachments

        Activity

          People

            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: