Avoid G_X lock for rename_collection within database

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 3.4.10, 3.5.10
    • Affects Version/s: 2.7.7
    • Component/s: Concurrency, Storage
    • None
    • Fully Compatible
    • ALL
    • v3.4
    • Storage 2017-07-31
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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:
            Geert Bosch
            Reporter:
            Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: