-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.4
-
Component/s: Index Maintenance
-
None
-
Environment:Ubuntu
-
ALL
-
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:
[
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"name" : "id"
},
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"background" : true,
"name" : "a_1"
},
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"background" : true,
"name" : "s_1"
},
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"background" : true,
"name" : "s_1"
},
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"background" : true,
"name" : "u_1"
},
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"background" : true,
"name" : "a_1"
},
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"background" : true,
"name" : "a_1"
},
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"background" : true,
"name" : "s_1"
},
{
"v" : 1,
"key" :
,
"ns" : "dealer_1.item",
"background" : true,
"name" : "u_1"
}
]
As you can see, multiple indexes with the same key, namespace, and name. This is troubling.
- duplicates
-
SERVER-9856 No check for building identical background indexes concurrently
- Closed