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

Create SessionLocker that checks for active transactions automatically

      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@mongodb.com Judah Schvimer
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: