Hey Allen,
Historical transactions that have absolutely no chance of being in use
or pending may be removed from the collection, so pretty much all of
it can go.
I suggest following the following procedure to clean it up:
- Run runner.ResumeAll(), wait until it returns, and ensure there are
no errors. This means all transactions up to that point were fully
applied.
- Ensure there are no misbehaving processes locked up for a long time
for whatever reason. Such a process might expect to see its own
transaction data before being done.
- Remove all transactions older than a day or so, using something like
bson.M{"_id": bson.M{"$lt": bson.NewObjectIdWithTime(minus24h)}} to
find them.
Glad to hear you've been making good use of txn.
gustavo @
http://niemeyer.net