We should have a way to clean things up in the database.
I think that there should be something that operates on the database that
accepts multiple rules that can be expressed in the form rule = (older_than,
max_db_size). The cleanup would proceed as:
for each rule in rules:
for each report in sort(reports, oldest_first)
if database_size < rule.max_db_size:
break
if report.age > rule.older_than: // if report.age is negative beyond a threshold, treat it as 0?
break
report.purge
Then we could specify rules like
(0, 4 * 1024 * 1024 * 1024) // always keep below 4GB
(60 * 60 * 24 * 7, 1 * 1024 * 1024 * 1024) // purge week-old reports to keep
below 1GB
(60 * 60 * 24 * 7 * 4, 512 * 1024 * 1024) // purge 4-week-old reports to keep
below 512MB
crashpad_handler can run the purge task periodically.
Original issue reported on code.google.com by mark@chromium.org on 25 Mar 2015 at 7:06
Original issue reported on code.google.com by
mark@chromium.org
on 25 Mar 2015 at 7:06