release package counter's ttl does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Daisy |
Triaged
|
Medium
|
Unassigned |
Bug Description
We have some data from 20130117 and 20130118 in the counters column family for a release and sourcepackage:
[default@crashdb] get Counters[
=> (counter=20130117, value=983)
=> (counter=20130118, value=123)
=> (counter=20130226, value=1670)
This should not be there though as we set a time to live of 4 weeks for the data. From submit.py:
def update_
# only store four weeks worth of data
time_to_live = 60*60*24*28
counters_
Come to find out that ttl is not supported with counters. See: http://
We should definitely remove the code in submit.py that sets the ttl. Additionally, since we only need 2 weeks of data (using 4 just in case) perhaps we should have a job that deletes anything more than that.
Changed in daisy: | |
importance: | Undecided → Medium |
Changed in daisy: | |
status: | New → Triaged |
Yeah, I think a daily cron job would work fine here. I think the safest approach would be a range scan (counters. get(column_ finish= fourweeksago) ) that then iterated over the columns and called counter_remove one-by-one. This way if we happened to timeout or otherwise fail when running this cron job, the next run of it would clean things up.