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

startParallelShell cannot be used in a shell started with a replica set connection string

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4, v3.2
    • Steps To Reproduce:
      Hide
      1. On localhost, start a replica set named 'replset' using ports 27017, 27018, 27019
      2. Connect with the shell
        mongo "mongodb://localhost:27017,localhost:27018,localhost:27019?replicaSet=replset"
      3. Use startParallelShell()
        replset:PRIMARY> startParallelShell(function() { print("test"); })()
      Show
      On localhost, start a replica set named 'replset' using ports 27017, 27018, 27019 Connect with the shell mongo "mongodb://localhost:27017,localhost:27018,localhost:27019?replicaSet=replset" Use startParallelShell() replset:PRIMARY> startParallelShell(function() { print("test"); })()
    • Sprint:
      Platforms 2017-10-02, Platforms 2017-10-23

      Description

      The function startParallelShell in server_misc.js is expecting the host attribute of the Mongo object (from db.getMongo()) to have the following format <host>:<port>.

      But when the mongo shell is started with a replica set connection string it is not the case.
      The host attribute is an internal connection string with the format <replica set name>/<host1>:<port1>,<host2>:<port2>,.... And an error will occur when trying to use startParallelShell.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: