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

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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.10, 3.4.10
    • Component/s: Server
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevin.albertson Kevin Albertson
              Reporter:
              emily.hall Emily Hall
              Participants:
              Last commenter:
              Kay Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                2 years, 51 weeks, 6 days ago
                Date of 1st Reply: