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

ReplSetTest#stopSet() no longer detects if a mongod process has crashed unexpectedly

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • Repl 2020-06-15, Repl 2020-07-13, Repl 2020-07-27, Repl 2020-08-10

    Description

      The changes from a417e97 as part of SERVER-39172 made it so MongoRunner.stopMongod() skips calling wait_for_pid() in shell_utils_launcher.cpp. It is then the responsibility of ReplSetTest#stopSet() to actually wait for the mongod processes to finish terminating. However, it doesn't do anything with the returned exitCode other than logging its value.

      ReplSetTest#stopSet() should throw a JavaScript exception in a similar fashion to MongoRunner.stopMongod().

      // If we are not waiting for shutdown, then there is no exit code to check.
      if (!waitpid) {
          return 0;
      }
      if (allowedExitCode !== returnCode) {
          throw new MongoRunner.StopError(returnCode);
      } else if (returnCode !== MongoRunner.EXIT_CLEAN) {
          print("MongoDB process on port " + port + " intentionally exited with error code ",
                returnCode);
      }
      

      Attachments

        Issue Links

          Activity

            People

              ali.mir@mongodb.com Ali Mir
              max.hirschhorn@mongodb.com Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: