[SERVER-6333] Progress percent counter for index build displays bogus values (> 100%) Created: 06/Jul/12  Updated: 02/Apr/14  Resolved: 07/Jul/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Michael O'Brien Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 07/Jul/12 ]

what's happening is the actual count of the collection is dropping as we delete dups.
so we've processed more entries than there are left.
I think this is correct.

Generated at Thu Feb 08 03:11:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.