WiredTiger.lock vs Mongod.lock

HI there!
What does conceptual difference between files WiredTiger.lock and Mongod.lock. If its both prevent to start more than one mongod process in current directory and could block process separately, why its need of two file?

Thank you an advance.

Hi @Alexander_43208,

The mongod.lock file is created by MongoDB and it lets the mongod process know that the datapath is in use.

The WiredTiger.lock file is created by the WiredTiger storage engine for its own use and to keep track of what WT files are currently locked. WT.lock is for mongod as well to know that WT files are locked since mongod is an application running on top of WT storage engine.

In essence, both of them does similar thing but at different level.

Hope it helps!

Thanks,
Shubham Ranjan
Curriculum Services Engineer