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

Progress percent counter for index build displays bogus values (> 100%)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      Reproduced this in 2.0.6 64bit linux with the following procedure - created a collection with 6million docs with some duplicates like this:

      for(var j=0;j<3;j++){
      for(var i=0;i<2000000;i++){ db.people.insert(

      {"x":i}

      ) }
      }

      Then built an index on "x" with

      {background:true, unique:true, dropDups:true}

      Then while index build is running, db.currentOp() shows output that contains odd values in "msg" for the percentage:

      PRIMARY> db.currentOp()
      {
      	"inprog" : [
      		{
      			"opid" : 6127309,
      			"active" : true,
      			"lockType" : "write",
      			"waitingForLock" : false,
      			"secs_running" : 366,
      			"op" : "insert",
      			"ns" : "test.system.indexes",
      			"query" : {
      				
      			},
      			"client" : "127.0.0.1:49932",
      			"desc" : "conn",
      			"threadId" : "0x7f4a48270700",
      			"connectionId" : 4229,
      			"msg" : "bg index build 5762333/2237667 257%",
      			"progress" : {
      				"done" : 5762333,
      				"total" : 2237667
      			},
      			"numYields" : 1875
      		}
      	]
      }
      

      Eventually the indexing did finish building successfully.

            Assignee:
            Unassigned Unassigned
            Reporter:
            mikeo@mongodb.com Michael O'Brien
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: