-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Server
-
Labels:
Documentation Request Summary:
Our documentation says that all operations on the database are blocked during the rename. Now this is only true for cross-database renames.
Engineering Ticket Description:
Probelm:
See https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/rename_collection.cpp#L113
Lock::GlobalWrite globalWriteLock(txn->lockState());
Solution:
Scope this lock as a DB_X when renaming within a database. Renaming between databases probably still requires a G_X or perhaps two DB_X locks.
- documents
-
SERVER-15723 Avoid G_X lock for rename_collection within database
- Closed
- duplicates
-
DOCS-10803 Highlight renameCollection caveats
- Closed