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

Clean up how the shell launches processes

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0
    • Fix Version/s: Backlog
    • Component/s: Shell
    • Labels:
      None

      Description

      Currently there are multiple ways to launch processes in the shell, some of which return the port number of a started mongo process and never join with it, others which wait for the process to terminate and join with it and return the exit code. There is no good way to get the exit code of a process launched that we don't expect to terminate immediately (like a mongod for example). We should have just one interface for launching processes that is flexible enough to handle both long-running mongod processes and short-lived processes like tools.

      There should be one function that launches a process and returns its PID, and another that joins with a PID and returns it's exit code. Those should be the only native code C++ functions built into the shell. The existing javascript functions for launching processes (runMongoProgram, startMongoProgram, runMongoProgramNoConnect, etc.) should then be re-written using these new C++ functions for backwards compatibility sake, and marked as deprecated. New, clean javascript functions should then be written for all new tests that need to launch new sub-processes. This will also need a clean way to handle and distinguish the cases where the newly launches process should and should not have username and password arguments appended to it's command line launch statement for running tests with auth.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: