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

Enhance ShardRegistry API providing more information about shard state

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

      During working under SERVER-99138 it was noticed that ShardRegistry API does not provide enough information about the shard state.

      For example:

      When the config shard is started to be migrated to the dedicated config server, it's not possible to check if the shard in in "draining" mode.

      Also another example after migration the special "config" shard id is still available via the call

      ShardRegistry::getShard()

      as it uses also

      _configShardData.findShard(shardId) 

      Then only one way to check if the config is the dedicated server to iterate through 

      Grid::get(opCtx)->shardRegistry()->getAllShardIds(opCtx); 

      and check if it contains "config" shard id.

      as it uses directly 

      _getData(opCtx)->getAllShardIds() 

      ShardRegistry API should be enhance to provide common information about the shard state.

      • Is the shard a "data shard"?
      • Is the shard in "draining" mode?
      • What type "config" is used
      • etc.

            Assignee:
            Unassigned Unassigned
            Reporter:
            igor.praznik@mongodb.com Igor Praznik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: