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

ConvertToCapped appears to be taking a G_X lock

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

      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@mongodb.com Kaloian Manassiev
            Reporter:
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: