If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

need to clobber broken urlclassifier3.sqlite files

RESOLVED FIXED

Status

()

Toolkit
Safe Browsing
RESOLVED FIXED
10 years ago
3 years ago

People

(Reporter: dcamp, Assigned: dcamp)

Tracking

Trunk
Points:
---
Dependency tree / graph
Bug Flags:
blocking-firefox3 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

v2
3.29 KB, patch
Tony Chang (Google)
: review+
damons
: approval1.9+
Details | Diff | Splinter Review
(Assignee)

Description

10 years ago
Created attachment 291524 [details] [diff] [review]
clobber out-of-date databases

Bugs 406621 and 406856 will have left some expired blacklist entries in the database.

Additionally, apparently sometime in early November google reset their database, which will have left a lot of databases in an inconsistent state.

The attached patch will clobber any database created by the old builds, and start updating fresh.  We should land this once 406856 lands.
Attachment #291524 - Flags: review?(tony)
(Assignee)

Comment 1

10 years ago
The google people Might be doing one more database rebuild sometime this week.  If they decide to do that, we should wait to land this patch until they've done that.

After that, we need google to rarely-if-ever reset the database again, and build a good way to recover from resets into the protocol (rather than just leaving databases in an inconsistent state).
Flags: blocking-firefox3?

Comment 2

10 years ago
Comment on attachment 291524 [details] [diff] [review]
clobber out-of-date databases

>+  if (databaseVersion != IMPLEMENTATION_VERSION) {
>+    LOG(("Incompatible database, removing."));
>+
>+    rv = connection->Close();
>+    NS_ENSURE_SUCCESS(rv, rv);
>+
>+    rv = mDBFile->Remove(PR_FALSE);
>+    NS_ENSURE_SUCCESS(rv, rv);
>+
>+    rv = storageService->OpenDatabase(mDBFile, getter_AddRefs(connection));
>+    NS_ENSURE_SUCCESS(rv, rv);
>+  }
>+
>+  rv = connection->SetSchemaVersion(IMPLEMENTATION_VERSION);
>+  NS_ENSURE_SUCCESS(rv, rv);

Can we put the SetSchemaVersion in the if block?

The rest looks good.
Attachment #291524 - Flags: review?(tony) → review+
(Assignee)

Comment 3

10 years ago
Created attachment 291548 [details] [diff] [review]
v2

new version doesn't check the schema on a newly-created database.
Attachment #291524 - Attachment is obsolete: true
Attachment #291548 - Flags: review?(tony)

Comment 4

10 years ago
Comment on attachment 291548 [details] [diff] [review]
v2

Yeah, I like this better.
Attachment #291548 - Flags: review?(tony) → review+
(Assignee)

Comment 5

10 years ago
Comment on attachment 291548 [details] [diff] [review]
v2

Google isn't going to be rebuilding their database, so this should be ready to land.
Attachment #291548 - Flags: approval1.9?

Updated

10 years ago
Attachment #291548 - Flags: approval1.9? → approval1.9+
(Assignee)

Comment 6

10 years ago
Checking in src/nsUrlClassifierDBService.cpp;
/cvsroot/mozilla/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp,v  <--  nsUrlClassifierDBService.cpp
new revision: 1.44; previous revision: 1.43
done
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
dave, this should indirectly fix that bug polvi was seeing, right?  (bug #406505)
(Assignee)

Updated

10 years ago
Duplicate of this bug: 406505

Updated

10 years ago
Flags: blocking-firefox3? → blocking-firefox3+
Component: Phishing Protection → Phishing Protection
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.