juju / mgopurge

A tool to repair broken mgo/txn transaction references in a Juju MongoDB instance.
Other
2 stars 7 forks source link

prune stage in 1.7 is super slow #30

Open axinojolais opened 6 years ago

axinojolais commented 6 years ago

Hi,

Since mgopurge 1.7, pruning is apparently done by chunks of 100k, but that's making the process super slow. I understand chunking was done on purpose, but is such a degradation of run time expected ?

Thanks

jameinel commented 6 years ago

So looking at the code, I think this was just a typo. The internal default is 1M, but when I added the flag to allow you to specify mgopurge -max-txns, I accidentally copied it as 1 1000 100, instead of 110001000. That's easy enough to fix.

The internal pruning engine does do it every 1M txns, I believe.