Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
None
-
Fully Compatible
-
ALL
-
-
Service Arch 2023-01-23, Service Arch 2023-02-06
Description
Some jstests will restart server processes using MongoRunner.
As part of each invocation of `MongoRunner.runMongoD` , MongoRunner will attempt to prepend the correct data path prefix to the data dir path if necessary. The logic it uses for doing so is to check if the current dbpath is absolute using this regex, and if it is not absolute to prepend the user-provided datapath to it.
The problem is that if the user-provided datapath is relative and not absolute, this check will not see if we already prepended the user-provided datapth and will therefore do so again. This is a problem when jstests like ReplSetTest re-start processes and preserve mongoRunner options between the restarts; it results in mongorunner being unable to restart the process because the re-computed datapath contains the user-provided prefix twice.