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

    • Fully Compatible
    • Linux
    • 0

      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@mongodb.com Benety Goh
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: