Add global lock ordering check to avoid lock-free reads taking a normal lock

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • CAR Team 2024-10-28, CAR Team 2024-11-11
    • 2
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In order to prevent lock ordering issues one simple approach would be to add a monotonically increasing check for the global locks. That is, the ResourceId associated to the global lock being taken must be always increasing barring recursive locks.

      Doing so would avoid having a class of issues where lock-free reads are taking a lock on a collection since normal collection locking usually locks the RSTL which comes before the global lock in the hierarchy.

      The attached patch should provide a base implementation for it and has already caught two of these issues which must be resolved before working on this ticket.

            Assignee:
            Unassigned
            Reporter:
            Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: