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

Turns out it isn't safe to use aggregation in 2.4 at all. #31

Merged
merged 1 commit into from Apr 21, 2017

Conversation

jameinel
Copy link
Member

@jameinel jameinel commented Apr 20, 2017

2.4 fails if the total size of the aggregation is too big,
while in 3.2 it only fails if the size of an individual doc
gets too big.
Running mgopurge against big 2.4 databases was failing
(2.4M txns * 20 bytes per ID is >16MB).

We already switched to just loading them one-by-one, it probably isn't much slower to use a Find() as we aren't doing anything fancy like $group.

(Review request: http://reviews.vapour.ws/r/6547/)

2.4 fails if the total size of the aggregation is too big,
while in 3.2 it only fails if the size of an individual doc
gets too big.
Running mgopurge against big 2.4 databases was failing
(2.4M txns * 20 bytes per ID is >16MB).
Copy link

@mjs mjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jameinel
Copy link
Member Author

$$merge $$ though I don't think that works

@jameinel jameinel merged commit 92f057b into juju:master Apr 21, 2017
jujubot added a commit to juju/juju that referenced this pull request Apr 27, 2017
use latest juju/txn

## Description of change

When running mgopurge against older Juju repositories, we found it doesn't do well with very large (2M+) txn collections on mongo 2.4. This brings in the fix for that. Its my understanding that Juju controllers on Trusty still use Mongo 2.4.

## QA steps

Running Juju against Mongo 2.4 with very large txn collections should successfully prune the txn collection instead of getting an error about the aggregation document being too large.

## Documentation changes

None

## Bug reference

juju/txn reference issue: juju/txn#31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants