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.
- depends on
-
SERVER-15723 Avoid G_X lock for rename_collection within database
- Closed