meteor-transactions icon indicating copy to clipboard operation
meteor-transactions copied to clipboard

Managing the size of the tx.Transactions collection

Open JackAdams opened this issue 10 years ago • 2 comments

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 tx object 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)?

JackAdams avatar Mar 14 '15 18:03 JackAdams

+1, but I agree, we can do it ourselves.

ericoe avatar Jun 09 '15 19:06 ericoe

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.

JackAdams avatar Jun 09 '15 23:06 JackAdams