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

mongod.lock file should be present in data directory regardless of storage engine selected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.8.0-rc4
    • Fix Version/s: 2.8.0-rc5
    • Component/s: Storage
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      Linux
    • Linked BF Score:
      0

      Description

      Currently, mongod.lock is created in the data directory by the mmapv1 initialization code and is not present when another storage engine (eg. WiredTiger) is selected.

      We should always ensure that this file is created (and locked) regardless of the storage engine used.

      ----------
      The --shutdown switch (Linux-specific) doesn't work with WiredTiger because the --shutdown code checks for a non-existent mongod.lock file:

      https://github.com/mongodb/mongo/blob/b0014456ddefaccf02016c1a89c514e865a099d6/src/mongo/db/db.cpp#L722-L729

      $ ./mongod --storageEngine=wiredTiger --fork --logpath=foo.log
      about to fork child process, waiting until server is ready for connections.
      forked process: 3680
      child process started successfully, parent exiting
       
      $ ./mongod --shutdown
      There doesn't seem to be a server running with dbpath: /data/db


      Version: b0014456dd

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              kamran.khan Kamran K.
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: