-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.8.0-rc0
-
Component/s: Querying
-
None
-
Environment:Linux version 2.6.18-194.11.1.el5xen (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48))
processor : 0,1,2
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
stepping : 2
cpu MHz : 2659.998
cache size : 12288 KB
MemTotal: 3145728 kB
Linux version 2.6.18-194.11.1.el5xen ( mockbuild@builder10.centos.org ) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) processor : 0,1,2 vendor_id : GenuineIntel cpu family : 6 model : 44 model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz stepping : 2 cpu MHz : 2659.998 cache size : 12288 KB MemTotal: 3145728 kB
-
Linux
-
None
-
None
-
None
-
None
-
None
-
None
-
None
[Status]
db.queue.findOne()
{
"_id" : ObjectId("4e9a90d9de142a0c5b392XYZ"),
"_u" : "xxx-yyy-zzz",
"status" : 1,
"update_time" : 1318752472
}
"status" value can be 0, 1, 2
db.queue.stats()
{
"ns" : "test.queue",
"count" : 153794,
"size" : 22760436,
"avgObjSize" : 147.99300362822996,
"storageSize" : 33327616,
"numExtents" : 8,
"nindexes" : 3,
"lastExtentSize" : 12079360,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 26050560,
"indexSizes" :
,
"ok" : 1
}
[Issues]
When executing the find() command with 2 conditions like belowing
db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:2}})
The following error message has occurred,
>> error:
{ "$err" : "assertion db/query.cpp:727" }However, when the filtering value for the second condition is in the range of "status" [0,1,2],
like this, "status":{$gt:0}, it runs well.
Notice that, "status" is not indexed and has only three integer value of 0, 1 or 2.
Moreover, the number of document needs to be large enough, in my case it is about 153794 documents.
[Detail]
For your information, I think the problem lies in shared pointer _c in db/query.cpp.
OK
db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:0}})
db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:1}})
>> error:
{ "$err" : "assertion db/query.cpp:727" }db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:2}})
db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:3}})
OK
db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$lt:2}})
>> error:
{ "$err" : "assertion db/query.cpp:727" }db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$lt:0}})
db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$lt:1}})