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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • 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:
            Unassigned
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: