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

Mongo shell javascript sharding admin functions not available in drivers

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin, Sharding
    • None
    • Sharding EMEA

      The following sharding mongo shell functions are implemented in client-side JS, and rely on the current layout of the config database and the collections within

      sh.disableBalancing
      sh.enableBalancing
      sh.getBalancerHost
      sh.getBalancerState
      sh.isBalancerRunning
      sh.removeShardTag
      sh.setBalancerState
      sh.startBalancer
      sh.stopBalancer
      sh.waitForBalancer
      sh.waitForBalancerOff
      sh.waitForDLock
      sh.waitForPingChange
      

      If a customer wants to configure their sharded cluster outside of the shell (i.e. through a driver), they need to re-implement the above in their language of choice.

      This unnecessarily exposes internal sharding implementation details to clients, which is an inappropriately fragile API for users to be dealing with. Any such client-side re-implementation of these functions is therefore brittle in the face of future changes to the sharding implementation (and upgrading across such changes would need to be very carefully managed).

      The situation is similar to SERVER-14378, where querying system.indexes and system.namespaces were replaced with the listIndexes/listCollections commands, for similar reasons. It would be useful if there was also an API (at some level) to allow users to dynamically manage sharded environments via drivers.

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            joanna.cheng@mongodb.com Joanna Cheng
            Votes:
            1 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: