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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.16, 5.0.3, 4.4.9, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v5.0, v4.4, v4.2
    • Execution Team 2021-06-14, Execution Team 2021-06-28

      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.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: