transaction collection (txns) grows without bound

Bug #1453785 reported by John A Meinel
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Menno Finlay-Smits
1.22
Fix Released
Critical
Menno Finlay-Smits
1.24
Fix Released
High
Menno Finlay-Smits

Bug Description

We use a capped collection for the Change Log notifications. However the 'txns' table itself that contains all of the actual transactions can grow without bound. We currently have a site that has 2.9M transactions taking up ~1GB of disk space. (The total size of the mongo dump is about 1.0GB but txns.bson is 0.97GB of that.)

http://grokbase.com/t/gg/mgo-users/13cj7c6kxt/when-to-delete-db-transaction is one reference that says you can just delete everything from the transactions table once there are no pending transactions.

However, in a live system, will we ever get quiescence to that degree? Is it possible that we can delete APPLIED transactions as long as none of the current PENDING transactions reference them? We'll need some investigation into when it is sane to prune the TXN collection.

Alternatively, we can just provide an ADMIN level operation where someone can manually trigger Juju to go into a WAIT state, not accepting new transactions, it forces txn.ResumeAll() waits for it to finish and then fully purges txns completely. (Or some sort of regular Worker that does so every day/week/month?)

Tags: stakeholder
Changed in juju-core:
importance: High → Critical
importance: Critical → High
Revision history for this message
John A Meinel (jameinel) wrote :

Note that with https://bugs.launchpad.net/juju-core/+bug/1454043 fixed while it still "saves everything forever" we drop ~90% of our transactions. So this is still important, but fixing 1454043 will give us 10x slower growth.

Changed in juju-core:
assignee: nobody → Menno Smits (menno.smits)
Changed in juju-core:
milestone: none → 1.25.0
Changed in juju-core:
status: Triaged → In Progress
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
no longer affects: juju-core/1.23
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.