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

runCreateIndexesWithCoordinator does not correctly relock the database

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.2.0-rc3, 4.3.1
    • Index Maintenance
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Storage NYC 2019-05-20, Execution Team 2019-06-03, Execution Team 2019-06-17
    • 0

    Description

      At the beginning of this code in runCreateIndexesWithCoordinator, a collection lock is acquired in MODE_IX using AutoGetCollection. This also locks the database in MODE_IX, but this lock is not yielded before trying to relock the database with MODE_X. This results in a conversion of the database lock instead of a relock, potentially resulting in deadlock.

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              geert.bosch@mongodb.com Geert Bosch
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: