Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongo capped collection does not create an index on _id field #17

Closed
s0enke opened this issue Jan 4, 2011 · 1 comment
Closed

mongo capped collection does not create an index on _id field #17

s0enke opened this issue Jan 4, 2011 · 1 comment

Comments

@s0enke
Copy link
Contributor

s0enke commented Jan 4, 2011

Getting this mongodb error occasionally:

Tue Dec 14 16:00:13 [conn1176] assertion 10129 too much data for sort() with no index ns:graylog2.messages query:{ $query: { deleted: { $in: [ false, null ] }, message: { $nin: [ /\#24861/, /Could\ not\ find\ subtype\ object\ for\ subtypeID\ 0\ in\ mm_WebsitePeer::createJimdo/, /Exception\ while\ trying\ to\ ping\ BlogPingR/, /Allowed\ memory\ size\ of\ 67108864\ bytes\ exhausted/, /contains\ an\ suspicious\ activity\ pattern/, /MatrixController\ \-\ create\ failed:\ Already\ created\ a\ new\ module/, /\[PAYMENT\]\[DEBUG\]\ GC\ api\ request\ xml/ ] } }, $orderby: { _id: -1 } }
Tue Dec 14 16:00:13 [conn1176]  ntoskip:0 ntoreturn:100
Tue Dec 14 16:00:13 [conn1176] query graylog2.messages ntoreturn:100 exception  514ms

http://www.mongodb.org/display/DOCS/Capped+Collections says:

"An index is not automatically created on _id for capped collections by default"

creating an index like this fixed the issue for us:

> db.messages.ensureIndex({_id: 1}, {unique: true});
@lennartkoopmann
Copy link
Contributor

The coming release (was schedules for last weekend. re-scheduled for next weekend) will no longer sort by _id but use natural ordering so this problem should no longer exist then.

Thanks!

joschi added a commit that referenced this issue Feb 13, 2018
* Ignore internal message fields (starting with "gl2_")

Closes #12

* Fix assertion message in GeoIpResolverEngineTest
joschi pushed a commit that referenced this issue Feb 15, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants