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

convertToCapped should not yield locks before renaming

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.10
    • Affects Version/s: 3.5.9
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Storage 2017-07-31
    • 0

      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.

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

              Created:
              Updated:
              Resolved: