ConvertToCapped appears to be taking a G_X lock

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 2.8.0-rc2
    • Affects Version/s: 2.8.0-rc0
    • Component/s: Concurrency
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/collection_to_capped.cpp#L217

                  // calls renamecollection which does a global lock, so we must too:
                  //
                  Lock::GlobalWrite globalWriteLock(txn->lockState());
                  Client::Context ctx(txn, dbname);
      

      Per SERVER-15723, the lock taken for renameCollection may change, therefore this command should

      • match any change made to renameCollection
      • this probably only needs to be DB_X lock because convertToCapped does not take a namespace parameter

            Assignee:
            Kaloian Manassiev
            Reporter:
            Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: