find().count() bug?

357 views
Skip to first unread message

Турченков Юрий

unread,
Oct 24, 2011, 7:25:06 AM10/24/11
to mongod...@googlegroups.com
mongodb version 2.0.1

Counting documents:

> db.emails.find({"tag": false}).count()
11332395
> db.emails.find({"tag": true}).count()
0
> db.emails.findOne({"tag": true})
{
        "_id" : ObjectId("4e0b1be9c79eb321c700000b"),
        "email" : "",
        "tag" : true,
        "used" : NumberLong(1309351412),
        "verified" : 0
}

tag is index key

count return 0 for "tag": True, but should return a number of documents




Турченков Юрий

unread,
Oct 24, 2011, 10:44:43 AM10/24/11
to mongodb-user
Bug found at logs (alot of assertions)

Looks like some inconsistence in mongodb database.
Just dumped and restored db and all working ok.
Reply all
Reply to author
Forward
0 new messages