Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9265

3.4: Clarify multiple fsyncLock behavior

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Critical - P2 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.

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 5 weeks, 1 day ago