Create SessionLocker that checks for active transactions automatically

XMLWordPrintableJSON

    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The pattern comes up a bunch of “lock the session mutex and then check if there is an active transaction” https://github.com/mongodb/mongo/blob/4e8b282809ba28eb2da14435a91981a3821343e1/src/mongo/db/session.cpp#L710-L715. Sometimes we call checkValid too. It’s not clear to me when we call one vs. the other. Making this clearer and providing a mechanism to lock the mutex and automatically make all of the required checks would prevent bugs and make the concurrency story clearer.

              Assignee:
              Judah Schvimer
              Reporter:
              Judah Schvimer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: