Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15723

Avoid G_X lock for rename_collection within database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.7.7
    • Fix Version/s: 3.4.10, 3.5.10
    • Component/s: Concurrency, Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4
    • Sprint:
      Storage 2017-07-31

      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

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: