meteor-transactions
meteor-transactions copied to clipboard
Managing the size of the tx.Transactions collection
The transactions collection in the database of my production app is 10x larger than the next largest collection (in terms of disk space). For this reason, I'm thinking of making the package automatically clean out old transactions -- like 6 months old (by default) -- and configurable to never remove old transactions with tx.purgeAfter = 0;.
Ideas on this issue:
- Provide a method on the
txobject to archive all transactions older than a given date. Then apps can use their own trigger mechanism (e,.g,. using synced-cron package, REST - triggered authenticated command etc). - Apps could just remove documents from the tx.Transactions collection themselves. Is there any need for having a tx method to do that (other than for encapsulation purposes)?
+1, but I agree, we can do it ourselves.
I'll probably do this at some stage, but it's low priority right now. More important to get a proper test suite written and a proper 2-phase commit as outlined in the mongo docs.