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

Poor handling of long-running operations in mongo client shell

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin, JavaScript
    • Labels:
      None
    • Fully Compatible

      When driving configuration from script files, there are a few places – such as when a cluster is starting up, or when an election is taking place – when the cluster passes through a series of relatively long-running state changes, and the script cannot continue until those changes have completed. The scripting interface provided is JavaScript; unfortunately, it is not practical to block in JavaScript, nor are any callbacks provided. We have only a few fallbacks, none of them great:

      • Break the JavaScript into several pieces, invoke them separately from shell scripts, and wait in the shell scripts. Requires polling.
      • Aggressively busy wait in the JavaScript.
      • Write all of this simple setup code in Java or another more-powerful programming language.

      It would be more convenient if we could either (1) choose to have mongo itself block until the full state change is complete, or (2) receive a callback when the operation is finished.

            Assignee:
            alyson.cabral@mongodb.com Alyson Cabral (Inactive)
            Reporter:
            eh-matching-mongo eHarmony Matching
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: