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

ApplyOps background index creation may deadlock

    • Fully Compatible
    • Linux
    • Hide
      • new replicaset without any data
      • standalone mongod on port 30005 (just for demonstration)
      • on replicaset primary:
         
        db.foobar.createIndex({"a": 1 }, {background: true})
        db.foobar.insert({"a":NumberLong("1444173423471"),"_id":"1444173420000-3"})
        
      • mongodump of oplog
        mongodump -d local -c oplog.rs --port 30001 -o dumptest/
        
      • reformat dump:
        mv dumptest/local/oplog.rs.bson dumptest/oplog.bson; rm -rf dumptest/local
        
      • mongorestore to replay oplog:
        mongorestore -v  --port 30005 --oplogReplay dumptest/
        
      Show
      new replicaset without any data standalone mongod on port 30005 (just for demonstration) on replicaset primary: db.foobar.createIndex({"a": 1 }, {background: true}) db.foobar.insert({"a":NumberLong("1444173423471"),"_id":"1444173420000-3"}) mongodump of oplog mongodump -d local -c oplog.rs --port 30001 -o dumptest/ reformat dump: mv dumptest/local/oplog.rs.bson dumptest/oplog.bson; rm -rf dumptest/local mongorestore to replay oplog: mongorestore -v --port 30005 --oplogReplay dumptest/
    • Repl E (01/08/16)

      I tried to replay the oplog on one server to recover however the mongorestore did kept running indefinitely, on the server many op are running trying to wait for a lock, and when trying to stop the server, it's not responsive, so I have to run kill-9 against it.

        1. mongod.log
          21 kB
        2. oplog.bson
          0.4 kB

            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: