convertToCapped should not yield locks before renaming

XMLWordPrintableJSON

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

      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
            Reporter:
            Geert Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: