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

Log additional debug info for the "invariant (_requests.empty());" in ~LockerImpl

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.0, 4.2.16, 5.0.3, 4.4.9
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v5.0, v4.4, v4.2
    • Sprint:
      Execution Team 2021-06-14, Execution Team 2021-06-28

      Description

      Somehow, the TransactionCoordinator, which appears to only take a mutex(es) in its own implementation, managed to invariant in ~LockerImpl after failing to acquire the global lock for a document write sub-operation via the DBDirectClient.

      It's unclear to me what could have gone wrong. The TransactionParticipant is the only component in the codebase using Locker instances outside of RAII types, but the TransactionCoordinator isn't involved with the TransactionParticipant at all as far as I can tell. We could add some logging information to the invariant failure. It isn't clear what information would be helpful, so basically whatever we can. ~LockerImpl checks that the lock requests are empty, which is a map of ResourceId to LockRequest -- we could log some of this information.

      The invariant failure was seen in the v4.2 branch.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dianna.hohensee Dianna Hohensee
              Reporter:
              dianna.hohensee Dianna Hohensee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: