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

convertToCapped should not yield locks before renaming

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.5.9
    • 3.5.10
    • Storage
    • None
    • Fully Compatible
    • ALL
    • Storage 2017-07-31
    • 0

    Description

      Since SERVER-29904, the convertToCapped uses mongo::renameCollection rather than directly calling the Database::renameCollection. As mongo::renameCollection takes a global lock, and convertToCapped only takes a global lock, we'd unlock before doing the final rename. However this caused a race condition when multiple concurrent convertToCapped operations are in progress. After SERVER-15723, we can call mongo::renameCollection while holding the database lock, thus fixing this issue.

      Attachments

        Issue Links

          Activity

            People

              geert.bosch@mongodb.com Geert Bosch
              geert.bosch@mongodb.com Geert Bosch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: