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

Global resource should participate in two-phase locking

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.2
    • Affects Version/s: 3.0.0, 3.2.18, 3.4.11, 3.6.2, 3.7.1
    • Component/s: Concurrency, Storage
    • Labels:
      None
    • Fully Compatible
    • Storage 2018-01-29, Storage 2018-02-12

      Currently, the two-phase locking logic only affects mode X and IX locks, and only for database, collection, and metadata Resources.

      Mode S and IS locks for any Resource, and Mode X and IX locks for global, mmapv1_flush, and mutex Resources do not participate in two-phase locking; such locks are released as soon as their holder destructs and are not held until the end of a containing WriteUnitOfWork.

      This logic should be changed such that the Global resource participates in two-phase locking. Otherwise, it is possible to write code that has a Database resource locked but without an appropriate Global resource lock – a violation of locking rules.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: