-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.2
-
Component/s: Concurrency, Index Maintenance, Querying
-
None
-
Environment:Debian 5, Linux kernel 2.6.26-2-amd64, mongod 2.2.2 Dec 13, php driver 1.3.0RC3-dev, node.js driver 1.2.-0
-
Linux
I have collection named "games" with rapidly changing content - documents are inserted every few seconds. Collection was TTL-indexed before with field "info.createtime".
Problem is that I constantly get this error with the collection:
Invalid BSONObj size: -286331154 (0xEEEEEEEE) first element: _id: ObjectId('50b5bafbae210be727000000')
I have discovered that it appears in regards of deleting documents while other clients trying to get some query results by that index. I tried to remove expireAfterSeconds attribute from index and do cron job removing expired items instead (with $atomic option), but the error remains the same.
I have struck into this problem, because the error exists on constant basis. Console command db.repairDatabase() fixes the problem but it reappears in next few hours.
After further discovering I was able to workaround this by calling reIndex() every time I remove expired items.
gamesCollection.remove( {'info.createtime': {$lt: hour_ago}, $atomic: 1}, {}, function() {
gamesCollection.reIndex(function(err, result) {});
});
The error didn't show anymore. But it is ugly way.
document example: http://pastebin.com/uFMrVfLR
db.games.getIndexes(): http://pastebin.com/Cz95ejK8
db.games.validate(): http://pastebin.com/BRfqp0kq
- is related to
-
SERVER-7511 update code does not properly determine if a positional mod is indexed, fix Mod::isIndexed()
- Closed