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

ConvertToCapped appears to be taking a G_X lock

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.8.0-rc2
    • 2.8.0-rc0
    • Concurrency

    Description

      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

      Attachments

        Activity

          People

            kaloian.manassiev@mongodb.com Kaloian Manassiev
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: