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

Reconcile how PrimaryOnlyService::lookupInstance() expects opCtx holding locks to be tagged as always interruptible

    • Fully Compatible
    • Sharding 2020-10-19
    • 14

      // If this operation is holding any database locks, then it must have opted into getting
      // interrupted at stepdown to prevent deadlocks.
      invariant(!opCtx->lockState()->isLocked() || opCtx->shouldAlwaysInterruptAtStepDownOrUp());
      

      OperationContext::setAlwaysInterruptAtStepDownOrUp() isn't called in the write command codepath and so the invariant in PrimaryOnlyService::lookupInstance() would get triggered. However, those operations are still interruptible at stepdown because they'll have acquire the global IX lock.

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: