Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47642

Investigate adding an assertion that a snapshot is not already held before acquiring an exclusive collection lock

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Execution Team 2020-10-19
    • 50

      There is a class of bugs that involves acquiring a Collection X lock, while already holding a storage snapshot, potentially because a global lock is already held and a prior read occurred. This violates assumptions that the owner of the Collection X lock makes, which is that all writes are visible, even though they may not. These lock acquisitions should be preceded by an abandonSnapshot().

      It would be interesting to add an invariant that a snapshot is is not already held while acquiring a collection X lock to evaluate whether these bugs already exist.

            brian.deleonardis@mongodb.com Brian DeLeonardis (Inactive)
            louis.williams@mongodb.com Louis Williams
            0 Vote for this issue
            7 Start watching this issue