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

Poor handling of long-running operations in mongo client shell

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Admin, JavaScript
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: