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

copydb appears to take out a G_X lock in some circumstances

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.8.0-rc0
    • Component/s: Concurrency
    • Labels:
    • Storage Execution
    • ALL
    • Quint Iteration 3

      Problem

      From copydb.cpp

      https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/copydb.cpp#L190

                  if (fromSelf) {
                      // SERVER-4328 todo lock just the two db's not everything for the fromself case
                      Lock::GlobalWrite lk(txn->lockState());
                      return cloner.go(txn, todb, fromhost, cloneOptions, NULL, errmsg);
                  }
      

      Solution

      For this case, perhaps taking out two DB_X locks rather than a G_X lock.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: