Closed
Bug 434805
Opened 17 years ago
Closed 16 years ago
work harder to recover from url-classifier db corruption
Categories
(Toolkit :: Safe Browsing, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dcamp, Assigned: dcamp)
Details
(Keywords: fixed1.9.0.2)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
samuel.sidler+old
:
approval1.9.0.2+
|
Details | Diff | Splinter Review |
The url-classifier relies on synchronous=OFF to get decent update performance on its large transactions. This opens up the possibility of db corruption in the case of a badly-timed power failure. There's no user data lost, we just need to rebuild the db from the server.
Right now we only reset the db if the corruption is detected when the database is open, which isn't always the case. Attached patch will recover from corruption detected during the update or lookup process.
As it stands right now, if corruption is detected during the update/lookup processes, the update/lookup will fail silently, and it won't fix itself.
Flags: blocking-firefox3?
Attachment #321795 -
Flags: review?(tony)
Assignee | ||
Updated•17 years ago
|
Whiteboard: [RC2?]
Comment 1•17 years ago
|
||
Comment on attachment 321795 [details] [diff] [review]
v1
Looks ok, but wouldn't it be easier to just do a test lookup after the open to see if the table is corrupt and reset at that point? This change seems a lot more invasive.
Attachment #321795 -
Flags: review?(tony) → review+
Assignee | ||
Comment 2•17 years ago
|
||
A single lookup isn't guaranteed to come across any given corrupted page.
Between all lookups and updates, though, we should detect corruption reasonably
quickly.
Comment 3•17 years ago
|
||
I see, I guess we could scan all the tables at startup, but that sounds worse. Ok, seems like the better approach.
Updated•17 years ago
|
Flags: blocking1.9.0.1+
Flags: blocking-firefox3?
Flags: blocking-firefox3-
Whiteboard: [RC2?] → [RC2-]
Updated•17 years ago
|
Assignee: nobody → dcamp
Updated•17 years ago
|
Version: unspecified → 3.0 Branch
Assignee | ||
Comment 4•17 years ago
|
||
Comment on attachment 321795 [details] [diff] [review]
v1
OK, so there's a simpler way to do this. After corruption is detected, every major call to sqlite functions returns SQLITE_CORRUPT. So we shouldn't really have to do all this weird propagation/saving, we can just check lastError at the end of an update process. Patch coming up...
Attachment #321795 -
Attachment is obsolete: true
Comment 5•16 years ago
|
||
I actually don't think this blocks based on the impact analysis in comment 0, but no reason why we shouldn't take the patch. Do we need bake-time on mozilla-central first?
Flags: wanted1.9.0.x+
Flags: blocking1.9.0.1-
Flags: blocking1.9.0.1+
Whiteboard: [RC2-]
Assignee | ||
Comment 6•16 years ago
|
||
This fix is a lot simpler.
Attachment #326625 -
Flags: review?(tony)
Comment 7•16 years ago
|
||
Comment on attachment 326625 [details] [diff] [review]
better fix
looks good; r+
Attachment #326625 -
Flags: review?(tony) → review+
Assignee | ||
Comment 8•16 years ago
|
||
Pushed to mozilla-central as changeset caeba7562e49.
Assignee | ||
Updated•16 years ago
|
Attachment #326625 -
Flags: approval1.9.0.1?
Assignee | ||
Comment 9•16 years ago
|
||
Oops, this doesn't build on windows, backed out until I can find the right way to fix it.
Assignee | ||
Updated•16 years ago
|
Attachment #326625 -
Flags: approval1.9.0.1?
Assignee | ||
Comment 10•16 years ago
|
||
Updated patch, was missing a REQUIRES.
Attachment #326625 -
Attachment is obsolete: true
Assignee | ||
Comment 11•16 years ago
|
||
Pushed to mozilla-central as df6e6f3ac380
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 12•16 years ago
|
||
Comment on attachment 333897 [details] [diff] [review]
updated patch.
Lost my approval flag with the updated patch...
Attachment #333897 -
Flags: approval1.9.0.2?
Comment 13•16 years ago
|
||
Comment on attachment 333897 [details] [diff] [review]
updated patch.
Approved for 1.9.0.2. Please land in CVS. a=ss
Attachment #333897 -
Flags: approval1.9.0.2? → approval1.9.0.2+
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite?
Assignee | ||
Comment 14•16 years ago
|
||
cvsroot/mozilla/toolkit/components/url-classifier/src/Makefile.in,v <-- Makefile.in
new revision: 1.22; previous revision: 1.21
done
Checking in src/nsUrlClassifierDBService.cpp;
/cvsroot/mozilla/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp,v <-- nsUrlClassifierDBService.cpp
new revision: 1.80; previous revision: 1.79
done
Keywords: fixed1.9.0.2
Assignee | ||
Updated•12 years ago
|
Flags: in-testsuite? → in-testsuite-
Updated•10 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•