Acquire/promote/release the critical section should NOT perform placement version checks

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

      When we acquire, promote, or release the critical section, we must first take the database or collection lock in MODE_X for the target resource. Taking this lock drains any in-flight operations and guarantees that the current thread is the only one that can access the resource. Today we obtain the lock through AutoGetDb / AutoGetCollection.

      Those RAII objects both

      1. acquire the requested lock, and
      2. return a reference to the database/collection, which triggers placement version checks.

      For the critical section, step 2) is unnecessary—we only need Lock::DBLock or Lock::CollectionLock. Leaving the placement version check in place can lead to surprising failures.

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

                Created:
                Updated:
                Resolved: