[SERVER-10684] Multiple indexes created when ensureIndex is called a lot with background = True Created: 05/Sep/13 Updated: 10/Dec/14 Resolved: 05/Sep/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 2.4.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Walt Woods | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | Create about (in our case 80) different threads that call ensureIndex with the same index spec, and background = True. |
||||||||
| Participants: | |||||||||
| Description |
|
Part of our mongodb model code involves calling ensureIndex() with background = True rather frequently. Or, did. We had to change it because it was creating literally hundreds of db.currentOp() entries relating to building the same index over and over. Our end result even after putting in a safe guard (which checks pymongo.index_information to see if anyone is creating this index) is ridiculous: [ , , , , , , , , , As you can see, multiple indexes with the same key, namespace, and name. This is troubling. |
| Comments |
| Comment by Walt Woods [ 05/Sep/13 ] |
|
Good call, we have several deployments, most of which are on 2.4.5. This one is on 2.4.4. Sorry, but thank you for the quick response! |
| Comment by J Rassi [ 05/Sep/13 ] |
|
It would seem that this is a dup of |