Closed Bug 1017117 Opened 11 years ago Closed 11 years ago

Add cron job for prune the last visited table

Categories

(bugzilla.mozilla.org :: Infrastructure, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dylan, Assigned: fubar)

Details

(Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/155] )

Bug 1000917 adds a database table which needs to be pruned nightly. Can you please add a cron job to run bugzilla/clean-bug-user-last-visit.pl each night. This job needs full database access it probably makes sense to run it on the same system that currently runs whine.pl, etc. this file doesn't currently exist on production, however it will be deployed in during the next push.
Assignee: server-ops-webops → klibby
Looking at the script, it runs only one query: DELETE FROM bug_user_last_visit WHERE last_visit_ts < NOW() - Bugzilla->params->{last_visit_keep_days} DAY Can I correctly assume there is an index on the last_visit_ts column?
There is not an index on that column currently, am I to understand that would be preferable before it is deployed? If so I can do that.
(In reply to Dylan William Hardison [:dylan] from comment #2) > There is not an index on that column currently, am I to understand that > would be preferable before it is deployed? If so I can do that. file an upstream bugzilla bug that modifies Bugzilla/Install/DB.pm.
Filed as bug 1022923
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/155]
Component: WebOps: Bugzilla → Infrastructure
Product: Infrastructure & Operations → bugzilla.mozilla.org
ping?
This is ready to be switched on in production, right?
(In reply to Dylan William Hardison [:dylan] from comment #6) > This is ready to be switched on in production, right? yes. it was ready at the time the bug was filed. bug 1022923 was an optimisation, not a blocker.
Added in r90256. Will run daily at midnight.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.