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

XMLWordPrintableJSON

    • Fully Compatible
    • Linux
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

              Assignee:
              Benety Goh
              Reporter:
              Kamran K. (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: