Closed Bug 993634 Opened 12 years ago Closed 8 years ago

bugzilla cron job uses reports table

Categories

(Socorro :: Backend, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rhelmer, Unassigned)

References

Details

https://github.com/mozilla/socorro/blob/master/socorro/cron/jobs/bugzilla.py#L256 If it doesn't need real-time data then reports_clean should be an easy replacement. reports_clean and bugzilla cron both run once per hour, we should also make the bugzilla cron depend on reports_clean.
Assignee: nobody → rhelmer
Status: NEW → ASSIGNED
Summary: bugzilla cron job uses reports → bugzilla cron job uses reports table
kairo says we might not want to use reports_clean here since not every crash we care about has correct release metadata at the present time (B2G in particular). processed_crashes would be a reasonable alternative in that case. I'll investigate.
Hrm since there's no index on signatures in processed_crashes (it's in the JSON blob), it looks like this would be pretty slow. I wonder if we're better off using ES here.
The cron looks only for the presence of a signature and ignores any metadata. It does this to avoid writing down bugs for signatures that socorro will not display. The solution doesn't need to be fast. I just sampled the logs and over a 16 hour period we averaged 2 bugs per run, with a max of 5.
(In reply to Chris Lonnen :lonnen from comment #3) > The cron looks only for the presence of a signature and ignores any > metadata. It does this to avoid writing down bugs for signatures that > socorro will not display. > > The solution doesn't need to be fast. I just sampled the logs and over a 16 > hour period we averaged 2 bugs per run, with a max of 5. Thanks. OK looked at this some more, and the current query isn't restricted to a date range, but we could get this from the last_run time and it should help. We do have a "signatures" table which would be perfect for this except that it only runs once per day. We should consider running that once per hour instead and making it use the processed_crashes table instead of reports... I'll file a separate bug for that.
Date range restriction doesn't make sense because we could have seen the signature years ago and only be getting the association for it now. If the signatures table holds what it sounds like it holds it would make far more sense to look there. +1 to that.
(In reply to Chris Lonnen :lonnen from comment #5) > Date range restriction doesn't make sense because we could have seen the > signature years ago and only be getting the association for it now. If the > signatures table holds what it sounds like it holds it would make far more > sense to look there. +1 to that. Ah thanks for pointing that out! U think it would be far too slow to scan all of the processed_crashes partitions each time bugzilla cron runs, it will take well over an hour based on some testing I did earlier (every JSON blob in every row needs to be parsed each time - it's the kind of thing we'd want to do once and store the output in a table). signatures table has what we want (one row for each unique signature Socorro has processed) - that table currently works by scanning the reports table daily so 1) we need it hourly and 2) bugzilla cron would still be indirectly depending on reports table. We need to fix #2 eventually anyway though. I'll file a dependent bug on running update_signatures() hourly, I'd like to get feedback from Selena before making a change like that (this isn't really urgent AFAIK but I know that we do want to excise reports table)
Depends on: 993833
(In reply to Robert Helmer [:rhelmer] from comment #4) > We do have a "signatures" table which would be perfect for this except that > it only runs once per day. I think it also is (right now) restricted to signatures that make it into reports_clean as it's part of what's used there. And yes, bug association should be picked up faster than daily if possible. :)
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #7) > (In reply to Robert Helmer [:rhelmer] from comment #4) > > We do have a "signatures" table which would be perfect for this except that > > it only runs once per day. > > I think it also is (right now) restricted to signatures that make it into > reports_clean as it's part of what's used there. Hmm it looks like update_signatures() right now is picking up everything from reports into a temp table, but only putting things in signatures that seem to have a valid product_version entry: https://github.com/mozilla/socorro/blob/master/socorro/external/postgresql/raw_sql/procs/update_signatures.sql
Not currently working on this.
Assignee: rhelmer → nobody
Status: ASSIGNED → NEW
Adrian took out the code that used the reports table in Jun 8th, 2017 in 1e8bc808. So this was effectively alleviated then. Marking as FIXED.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.