Closed Bug 1296751 Opened 8 years ago Closed 8 years ago

Updating browser.safebrowsing.provider.*.(nextupdatetime|lastupdatetime) causes all Safe Browsing to be re-initialized

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: francois, Assigned: tnguyen)

References

Details

Attachments

(1 file)

The prefs don't need to be re-read when we update the nextupdatetime or lastupdatetime just after a successful update.

This is probably causing unnecessary blocking disk I/O.
listmanager: 14:07:08 GMT-0700 (PDT): update success for goog-phish-shavar,goog-malware-shavar,goog-unwanted-shavar,goog-badbinurl-shavar from https://safebrowsing.google.com/safebrowsing/downloads?client=navclient-auto-ffox&appver=51.0a&pver=2.2&key=[trimmed-google-api-key]: 1713
listmanager: 14:07:08 GMT-0700 (PDT): Waiting 1713000ms
listmanager: 14:07:08 GMT-0700 (PDT): Setting last update of google to 1471640828888
SafeBrowsing: 14:07:08 GMT-0700 (PDT): reading prefs
SafeBrowsing: 14:07:08 GMT-0700 (PDT): getLists: urlclassifier.phishTable
SafeBrowsing: 14:07:08 GMT-0700 (PDT): getLists: urlclassifier.malwareTable
SafeBrowsing: 14:07:08 GMT-0700 (PDT): getLists: urlclassifier.downloadBlockTable
SafeBrowsing: 14:07:08 GMT-0700 (PDT): getLists: urlclassifier.downloadAllowTable
SafeBrowsing: 14:07:08 GMT-0700 (PDT): getLists: urlclassifier.trackingTable
SafeBrowsing: 14:07:08 GMT-0700 (PDT): getLists: urlclassifier.trackingWhitelistTable
SafeBrowsing: 14:07:08 GMT-0700 (PDT): getLists: urlclassifier.blockedTable
SafeBrowsing: 14:07:08 GMT-0700 (PDT): initializing safe browsing URLs, client id navclient-auto-ffox
Assignee: nobody → tnguyen
Status: NEW → ASSIGNED
Comment on attachment 8784276 [details]
Bug 1296751 - Skip observe browser.safebrowsing.provider.*.(nextupdatetime|lastupdatetime).

https://reviewboard.mozilla.org/r/73798/#review71856

That looks good to me.

Before landing, if you haven't done so already, please do a manual test.

Something like:

1. enable the debug output to the console
2. reset the `browser.safebrowsing.provider.mozilla.nextupdatetime` pref back to `1`
3. confirm this doesn't trigger reading the prefs again
4. update the tracking protection pref `urlclassifier.trackingTable` to add `content-track-digest256` to the list
5. confirm that the prefs are re-read as soon as you've modified that pref and that the `content-track-digest256` is downloaded/updated
6. after the list is updated, the `nextupdatetime` should be updated without triggering a re-reading of the prefs
Attachment #8784276 - Flags: review?(francois) → review+
Just run the test test_classifer_changetablepref.html and observed the result.
Thanks you for your review
> 4. update the tracking protection pref `urlclassifier.trackingTable` to add
> `content-track-digest256` to the list
> 5. confirm that the prefs are re-read as soon as you've modified that pref
> and that the `content-track-digest256` is downloaded/updated

The update is not kicked off because updateCheckers_ is not cleared. This ends with "No updates needed or already initialized ..."
Anyway, enable debug log in test_classifer_changetablepref.html and change the UPDATE_URL = "http://mochi.test:8888/chrome/toolkit/components/url-classifier/tests/mochitest/update.sjs";
I can observe it works
Thanks you
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fa10bd34b8f7
Skip observe browser.safebrowsing.provider.*.(nextupdatetime|lastupdatetime). r=francois
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/fa10bd34b8f7
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: