[SERVER-715] Background indexing does not work with 1.3.3 server Created: 08/Mar/10  Updated: 29/May/12  Resolved: 15/Mar/10

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

Type: Bug Priority: Minor - P4
Reporter: Chuck Remes Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Darwin Mac-Pro.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386
mongod 1.3.3 64-bit, standalone client


Participants:

 Description   

http://gist.github.com/325434

The gist shows an index build with the

{background: true}

option added. Further down in the gist it shows the results of a call to db.currentOp() where a simple query ("show collections") is blocked by the index build.



 Comments   
Comment by Aaron Staple [ 15/Mar/10 ]

Hi Chuck,

When a background index job is in progress, the lock is held most of the time but released occasionally in order for other ops to run. The lock is released somewhat infrequently by design so that index creation runs quickly. This means that it is not unexpected to see an op blocked on an index build. However, it would be a problem if that op was blocked by the index build for an unreasonable amount of time. If the op is blocked for too long in your opinion (or is blocked indefinitely), please reopen the bug and let us know.

Comment by Eliot Horowitz (Inactive) [ 09/Mar/10 ]

I have a feeling you're seeing normal behavior.
The background index basically takes the lock, and then releases, so sometimes other things will be blocking on it.
Its just always going to be a very short block

Generated at Thu Feb 08 02:54:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.