[SERVER-30850] startParallelShell cannot be used in a shell started with a replica set connection string Created: 25/Aug/17  Updated: 08/Jan/24  Resolved: 04/Oct/17

Status: Closed
Project: Core Server
Component/s: Shell, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.4.14, 3.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Yves Duhem Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-22382 mongo shell should accept mongodb:// ... Closed
is depended on by SERVER-32691 Create passthrough for w="majority" w... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4, v3.2
Steps To Reproduce:
  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"); })()
Sprint: Platforms 2017-10-02, Platforms 2017-10-23
Participants:

 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.



 Comments   
Comment by Githook User [ 14/Feb/18 ]

Author:

{'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon', 'username': 'sgolemon'}

Message: SERVER-30850 Handle replica set connection strings in startParallelShell()

(cherry picked from commit 284d80ba6ee928cdf3d8f23c161a7ee1bf4a8faf)
Branch: v3.4
https://github.com/mongodb/mongo/commit/f045ad4878ad035b0f66013367a2d7eb466bd95f

Comment by Githook User [ 04/Oct/17 ]

Author:

{'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon', 'username': 'sgolemon'}

Message: SERVER-30850 Handle replica set connection strings in startParallelShell()
Branch: master
https://github.com/mongodb/mongo/commit/284d80ba6ee928cdf3d8f23c161a7ee1bf4a8faf

Comment by Max Hirschhorn [ 25/Aug/17 ]

mira.carey@mongodb.com, this issue is going to prevent running tests that use startParallelShell() from running in a stepdown suite against a replica set.

Generated at Thu Feb 08 04:25:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.