Potential deadlock while migrating sessions

XMLWordPrintableJSON

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

      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.

            Assignee:
            Janna Golden
            Reporter:
            Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: