-
Type: Task
-
Resolution: Done
-
Priority: Critical - P2
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
1
Documentation Changes
- Clarify that fsyncLock/fsyncUnlock tracks the number of open fsyncLocks. For example, fsyncLock(); fsyncLock(); fsyncUnlock(); stays locked.
- Document lockCount field of return document.
Description
Currently (and historically) users could call fsyncLock multiple times which would then require the same number of fsyncUnlock calls to unlock the mongod instance. We should make this behavior clear in both our fsyncLock and fsyncUnlock documentation. I would recommend changing just for 3.4 as there exists a race condition that makes multiple lock/unlock unsafe prior to 3.4 (see SERVER-6302).
Additionally, with the fix for SERVER-6302 in 3.4 we added a "lockCount" field to the fsyncLock / fsyncUnlock result documents. This field contains the lock count after executing the command. In the fsyncUnlock case, a lockCount of "0" means the lock has been released and mongod can accept writes. We should reference this field and behavior in our documentation.
- is duplicated by
-
DOCS-5976 fsyncLock documentation does not discuss behaviour of multiple locks
- Closed
- related to
-
SERVER-6302 Race condition when multiple fsyncLock() invocations made on a mongod instance.
- Closed