Closed
Bug 516932
Opened 15 years ago
Closed 15 years ago
Add an advanced maintainance task to vacuum and check integrity, for support purposes.
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
VERIFIED
FIXED
mozilla1.9.3a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: mak, Assigned: mak)
Details
(Keywords: verified1.9.2)
Attachments
(1 file, 3 obsolete files)
8.14 KB,
patch
|
dietrich
:
approval1.9.2+
|
Details | Diff | Splinter Review |
We often have to point people to how vacuum or check integrity on their database, we could just add an additional method to PlacesDBUtils, and point people to run that method in the error console. It would run an integrity check, reporting results in the console, and eventually a REINDEX if the integrity check fails. Then it would run a vacuum. Eventually in future this could even be added to a button in the new about:support page. Notice this would never be run automatically.
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → mak77
Assignee | ||
Comment 1•15 years ago
|
||
Assignee | ||
Comment 2•15 years ago
|
||
this is just reporting results to the console, for 1.9.2 we can't take string changes, so i'd go for a simple solution like this, just to be able to tell users to activate this in the Error Console and see if reported bugs could be due to corruption or lack of vacuuming. This still needs some db stat, i could integrate part of places stats project, to print most important stats, and db file size (also before/after vacuum so we can guess if vacuum is running too rarely). As a test i'll just check it does not throw, and does not apply corrupt tasks to a sane db. in a followup we can hook this into about:support and create a better formatted report.
Attachment #403498 -
Attachment is obsolete: true
Assignee | ||
Comment 3•15 years ago
|
||
this is something we can take on 1.9.2, integration with about:support can be done in a followup (due to passed string freeze). The method just returns a string with informations and simple labels, that is printed in the error console on eval, user can just copy it and paste into support forum or in a bug. For support purposes i think we just need size of the db and number of entries per table. Any other statistic purpose is better covered by the stats project. the full command to paste in the error console will be: Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm"); PlacesDBUtils.checkDatabase();
Attachment #403619 -
Attachment is obsolete: true
Attachment #403784 -
Flags: review?(dietrich)
Assignee | ||
Updated•15 years ago
|
Flags: in-testsuite?
Comment 4•15 years ago
|
||
Comment on attachment 403784 [details] [diff] [review] patch v1.2 s/MAINTANANCE/MAINTENANCE/ i'm a little worried that the name is too innocuous. since it actually will take steps to *fix* the database, you should name the function so that is clear. or have the fix part be an bool param. r=me w/ these fixed.
Attachment #403784 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 5•15 years ago
|
||
well yeah, i backup the db in case of a fix a bool param would work but you know, users just search for fixes in forums and around, and they don't ask themselves what (TRUE) means as a param. I should probably split into CheckDatabase and CheckAndFixDatabase to hide the bool param.
Assignee | ||
Comment 6•15 years ago
|
||
otherwise just make this checkAndFixDatabase... since even the check will at least execute vacuum and cleanup.
Assignee | ||
Comment 7•15 years ago
|
||
gone for PlacesDBUtils.checkAndFixDatabase(); based on IRC discussion with dietrich.
Attachment #403784 -
Attachment is obsolete: true
Assignee | ||
Comment 8•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/77e5bfb0ef73
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Assignee | ||
Updated•15 years ago
|
Flags: in-testsuite? → in-testsuite+
Assignee | ||
Updated•15 years ago
|
OS: Windows Vista → All
Hardware: x86 → All
Assignee | ||
Comment 9•15 years ago
|
||
To actually use this: Open error console, in the eval field paste the following code and click Eval: Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm"); PlacesDBUtils.checkAndFixDatabase(); paste the output message to a bug if it's returning a corrupt database.
Assignee | ||
Comment 10•15 years ago
|
||
Comment on attachment 404581 [details] [diff] [review] patch v1.3 low risk, high help for support, with test. i think this should really make 1.9.2.
Attachment #404581 -
Flags: approval1.9.2?
Comment 11•15 years ago
|
||
Comment on attachment 404581 [details] [diff] [review] patch v1.3 low risk, high value to support, and has tests -> a+.
Attachment #404581 -
Flags: approval1.9.2? → approval1.9.2+
Assignee | ||
Comment 12•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/ac876a88f354
status1.9.2:
--- → beta1-fixed
Comment 13•15 years ago
|
||
Verified fixed on trunk and 1.9.2 with: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20091016 Minefield/3.7a1pre ID:20091016035239 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2b1pre) Gecko/20091014 Namoroka/3.6b1pre ID:20091014033739
Status: RESOLVED → VERIFIED
Keywords: verified1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•