transaction collection (txns) grows without bound
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://
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?)
Changed in juju-core: | |
importance: | High → Critical |
importance: | Critical → High |
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 |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
no longer affects: | juju-core/1.23 |
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.