Closed Bug 1112096 Opened 10 years ago Closed 9 years ago

purge journal data older than 6 months

Categories

(Input Graveyard :: Code Quality, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

Details

(Whiteboard: u=dev c=data p=1 s=input.2015q3)

We have a journaling system that keeps track of application errors and some other things and gives us a good way of diagnosing and keeping track of problems in the application-layer. However, we don't want to or need to keep that data forever. Further, that data could be talking about other data we purge when it's older than 6 months. For those reasons, we should add some code to purge journal data that's older than 6 months.
Summary: purge journal → purge journal data older than 6 months
Changing this to a P1. It should get done asap.
Priority: -- → P1
Weird. I thought I added a comment about changing the journal. I think instead of purging all the data that's older than 6 months, we instead should change the journal record so that each record has an expiration date. Data we're tossing in the journal is all different and some can expire sooner than other bits. Thus the new system would require the logger to specify the expiration for the entry. Then we create a purge management command that purges everything that's expired. I think that's a couple of days of work, so tentatively marking this as 2 points.
Whiteboard: u=dev c=data p= s=input.2015q1 → u=dev c=data p=2 s=input.2015q1
I still want to do this, but can't this quarter. Pushing it off.
Whiteboard: u=dev c=data p=2 s=input.2015q1 → u=dev c=data p=2 s=input.2015q2
Whiteboard: u=dev c=data p=2 s=input.2015q2 → u=dev c=data p=2 s=input.2015q3
Yeah, the data in the journal is all different, but I'm thinking the journal shouldn't be holding any data that's not ephemeral. e.g. if we lose it all, we should be fine. Given that, I'm going to go with the much-easier-to-implement "delete everything older than 6 months" method. Grabbing this now since the table is getting pretty big and slow.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Making this 1 point. It involves the following work: 1. create a maangement command that deletes everything older than 6 months and prints to stdout how much it deleted 2. write a test to make sure the management command is working properly 3. add a cronjob to run the management command every sunday
Whiteboard: u=dev c=data p=2 s=input.2015q3 → u=dev c=data p=1 s=input.2015q3
I'm tweaking item 1 to generalize it into a big project-wide "purge_data" command which will touch all the apps that have a purge function registered.
Pushing this to prod just now. I'll make sure to check it on Monday. Pretty sure it'll be fine, so I'm going to optimistically mark it FIXED now.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.