Use MODE_IX instead of MODE_X collection/db lock when exiting the critical section

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-07-21
    • 1
    • None
    • 3
    • TBD
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      Locking the collection or database during any modification of the critical section should follow this pattern:

      • S mode to block writes (catch-up phase)
      • X mode to block reads (promote phase)
      • None (or IX) to releasing the critical section

      Currently, exiting the critical section requires acquiring the collection/database lock in MODE_X.

      This ticket proposes reducing that to MODE_IX, as there is no need for such a restrictive lock at that stage. When the critical section is already entered (i.e., reads/writes are blocked), it's sufficient to acquire only the CSS/DSS mutex to exit the critical section.

              Assignee:
              Pol Pinol
              Reporter:
              Pol Pinol
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: