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

Make the GlobalLock and DBLock RAII types aware of yields

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • CAR Team 2023-11-13, CAR Team 2023-11-27, CAR Team 2023-12-11, CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22, CAR Team 2024-02-05, CAR Team 2024-02-19, CAR Team 2024-03-04, CAR Team 2024-03-18, CAR Team 2024-04-01, CAR Team 2024-04-15, CAR Team 2024-04-29, CAR Team 2024-05-13, CAR Team 2024-05-27, CAR Team 2024-06-10
    • 1

      Both classes expose an isLocked() method that returns true if the lock acquisition had succeeded during object construction.

      These isLocked() methods are unaware of lock yields and return true even if the lock has been rescinded.
      I am unaware of an existing bug due to this behaviour, however this has been a source of confusion when investigating SERVER-79761.

      We should make these two methods aware of yields by having them consult the lock manager.

            Assignee:
            Unassigned Unassigned
            Reporter:
            josef.ahmad@mongodb.com Josef Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: