Closed Bug 1653263 Opened 4 years ago Closed 4 years ago

Introduce a page-to-icon relation expiration time

Categories

(Toolkit :: Places, task, P3)

task
Points:
3

Tracking

()

RESOLVED FIXED
81 Branch
Iteration:
80.2 - July 13 - July 26
Tracking Status
firefox81 --- fixed

People

(Reporter: mak, Assigned: mak)

References

Details

Attachments

(1 file)

While discussing with Connor about favicons corruption, I figured that part of our issue with expiring bogus favicons is that we only check icons expiration time when introducing an icon update. Basically, if an icon has a bogus association with a page but it also has a valid association to another page, the bogus association may never go away because the icon will never expire.

So what about we introduce an epiration time on relations too, when an icon is associated to a page, we set an expiration time on that relation.

When associating new icons to a page, instead of removing relations based on icon expiration, we'd remove them based on their own expiration. This should pretty much solve the problem of bogus associations after the expiration time (7 days by default).

The storage costs should be around 6 bytes per relation, my 77MiB database with 110k relations would grow by about 600KiB.

The initial migration would set the same value (today) on every relation. the INSERT OR IGNORE INTO moz_icons_to_pages queries should probably start using ON CONFLICT to update the expiration time.

Assignee: nobody → mak
Status: NEW → ASSIGNED
Iteration: --- → 80.2 - July 13 - July 26
Points: --- → 3

Until now, when icons for a new page were stored, we removed the old page-icon
relations based on the icon expiration. But a single icon can be in use from
many pages and it's expiration gets bumped for any of them. This means that if
an icon has even just a single valid page in use, all of its relations may
survive forever.
This patch introduces an expiration on the page-icon relation instead, so that
the relations themselves can be expired when new icons for a page are loaded.
Icons without relations (provided they are not root icons) will then be expired
by Expiration, Maintenance or History.

Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/623ac5b0c085
Introduce a page-icon relation expiration and use it to expire icons when storing new icons for a page. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Blocks: 1533480
Blocks: 1660505
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: