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

Potential deadlock while migrating sessions

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • Sharding 2019-04-08, Sharding 2019-05-06, Sharding 2019-05-20
    • 12

    Description

      SessionCatalogMigrationSource::_fetchNextNewWriteOplog() uses a DBDirectClient to do a query on the oplog. This is called after obtaining a lock as part of the AutoGetActiveCloner.
      Attempting to read the oplog through the query system will end up calling waitForAllEarlierOplogWritesToBeVisible(). This will result in deadlocks sometimes, as there could be oplog writes that cannot become visible because they committed prior to some blocked uncommitted transaction that is blocked by the problematic code (thus completing the circle of deadlocks.)

      The possible change _fetchNextNewWriteOplog() to not use a DBDirectClient.

      Attachments

        Activity

          People

            janna.golden@mongodb.com Janna Golden
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: