-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.8.0-rc0
-
Component/s: None
-
Labels:None
-
ALL
Running a count on a newly created index caused an assertion. mongod then complained the db was corrupt and to run a repair, which I did, which resolved the issue.
pb1:PRIMARY> use postbacks
switched to db postbacks
db.createCollection("postbacks",
) // 2GB
{ "ok" : 1 }pb1:PRIMARY> db.postbacks.ensureIndex(
{ '_id' : 1},
{background: true})
pb1:PRIMARY> db.postbacks.ensureIndex(
,
{background: true})
pb1:PRIMARY> db.postbacks.stats()
{
"ns" : "postbacks.postbacks",
"count" : 0,
"size" : 0,
"storageSize" : 2147483904,
"numExtents" : 2,
"nindexes" : 2,
"lastExtentSize" : 1057040,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 16384,
"indexSizes" :
,
"capped" : 1,
"max" : 2147483647,
"ok" : 1
}
pb1:PRIMARY> db.postbacks.count(
)
0
pb1:PRIMARY> db.postbacks.count(
)
0
pb1:PRIMARY> db.postbacks.count(
)
0
pb1:PRIMARY> db.postbacks.count()
3944
pb1:PRIMARY> db.postbacks.stats()
{
"ns" : "postbacks.postbacks",
"count" : 4522,
"size" : 186458896,
"avgObjSize" : 41233.72313135781,
"storageSize" : 2147483904,
"numExtents" : 2,
"nindexes" : 2,
"lastExtentSize" : 1057040,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 278528,
"indexSizes" :
,
"capped" : 1,
"max" : 2147483647,
"ok" : 1
}
pb1:PRIMARY> db.postbacks.dropIndexes()
{
"nIndexesWas" : 2,
"msg" : "non-_id indexes dropped for collection",
"ok" : 1
}
pb1:PRIMARY> db.postbacks.ensureIndex(
,
{background: true})
interrupted at shutdown
pb1:PRIMARY> use sd
switched to db sd
Thu Mar 3 00:32:42 DBClientCursor::init call() failed
> use postbacks
switched to db postbacks
Thu Mar 3 00:32:45 trying reconnect to 127.0.0.1
Thu Mar 3 00:32:45 reconnect 127.0.0.1 ok
pb1:PRIMARY> db.repairDatabase()
pb1:PRIMARY> db.postbacks.stats()
{
"ns" : "postbacks.postbacks",
"count" : 12955,
"size" : 548969696,
"avgObjSize" : 42375.1212659205,
"storageSize" : 2147483904,
"numExtents" : 2,
"nindexes" : 0,
"lastExtentSize" : 1057040,
"paddingFactor" : 1,
"flags" : 0,
"totalIndexSize" : 0,
"indexSizes" : {
},
"capped" : 1,
"max" : 2147483647,
"ok" : 1
}
pb1:PRIMARY> db.postbacks.ensureIndex(
,
{background: true})
pb1:PRIMARY> db.postbacks.ensureIndex(
,
{background: true})
pb1:PRIMARY> db.postbacks.stats()
{
"ns" : "postbacks.postbacks",
"count" : 12955,
"size" : 548969696,
"avgObjSize" : 42375.1212659205,
"storageSize" : 2147483904,
"numExtents" : 2,
"nindexes" : 2,
"lastExtentSize" : 1057040,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 876544,
"indexSizes" :
,
"capped" : 1,
"max" : 2147483647,
"ok" : 1
}
pb1:PRIMARY> db.postbacks.count(
)
12955