Closed Bug 1272053 Opened 9 years ago Closed 9 years ago

Refactor how we cache individual bug data cache

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: peterbe)

Details

Attachments

(1 file)

We currently have a model (with a 1h cache) called crashstats.crashstats.models.BugzillaBugInfo. Calls to this almost NEVER succeed in cache hits. That's because the parameters to it is often wholesale with many many bug IDs in the query string. If only one new bug appears on a page which we need the summary/status/resolution for the query string changes and it's another cache miss and it incurs a big API query to bugzilla.mozilla.org. Instead, we should cache individual bugs. This is what we do with the GraphicsDevices model too. If you do these two: GET /buginfo/bug?bug_ids=123,124 GET /buginfo/bug?bug_ids=124,125 That's going to incur two queries to https://bugzilla.mozilla.org/rest/bug: GET https://bugzilla.mozilla.org/rest/bug?bugs=123,124&include_fields=... GET https://bugzilla.mozilla.org/rest/bug?bugs=124,125&include_fields=... So basically, we're asking Bugzilla about bug ID 124 TWICE. If we instead cache each individual bug, this is instead what we'd query bugzilla: GET https://bugzilla.mozilla.org/rest/bug?bugs=123,124&include_fields=... GET https://bugzilla.mozilla.org/rest/bug?bugs=125&include_fields=... This example uses 3 distinct bugs. But loading a Firefox Top Crasher page, will query for about: ~100 bug IDs per page. At the time of writing, loading all 4 Top Crashers covers a total of 417 bug IDs. Only 217 of those are unique (i.e. only appears on 1 Top Crasher version page)
Commits pushed to master at https://github.com/mozilla/socorro https://github.com/mozilla/socorro/commit/fc62225eff4b94516e5a41caf7041a4bf3ba14d6 fixes bug 1272053 - Refactor how we cache individual bug data cache https://github.com/mozilla/socorro/commit/6738314e64ad4bf7d36a8b2424f8078137fd82e5 Merge pull request #3344 from peterbe/bug-1272053-refactor-how-we-cache-individual-bug-data-cache fixes bug 1272053 - Refactor how we cache individual bug data cache
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: