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

Migrate Interruptible/UninterruptibleLockGuard from Locker into OperationContext

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0, 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • v8.0
    • CAR Team 2024-04-01, CAR Team 2024-04-15

      Interruptible/UninterruptibleLockGuard exist today to mark an operation as interruptible/uninterruptible. This is implemented as a set of members of Locker that get modified by the RAII class.

      The expectation is that the Locker is wholly owned by an OperationContext and the locker will not be shifted from beneath it. However, this is not true in the case of multi-document transactions that perform a remote call as they will yield the session back to avoid deadlocking if we call. The Locker is owned by the Session and could be checked out by another operation while the remote call hasn't yet finished.

      This means that at this point two operations would believe to own the same Locker instance. This is a problem since both operations would concurrently be modifying the same Locker instance expecting to be the only writers.

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: