Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10528

Docs for SERVER-15723: Avoid G_X lock for rename_collection within database

      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.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            emily.hall Emily Hall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 27 weeks, 1 day ago