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

Mongo shell javascript sharding admin functions not available in drivers

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Admin, Sharding
    • Labels:
    • Case:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated: