Closed Bug 770899 Opened 11 years ago Closed 11 years ago

Prefetch clearing should be repurposed to delete 0 sized read only .pf files only

Categories

(Core :: Widget: Win32, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla16

People

(Reporter: bbondy, Assigned: bbondy)

References

Details

(Whiteboard: [qa!])

Attachments

(1 file)

Once Bug 770883 lands on Nightly (currently v16) and gets uplifted to Aurora (currently v15), we should land a new patch from this bug on Nightly (currently v16) that will delete the prefetch files only if they are readonly and 0 bytes.  This patch will not get manually uplifted to Aurora, but will land there naturally on the next migration. 

This will effectively undo anyone's prefetch that is currently disabled.  This bug will NOT be requested to go onto Aurora (v15)
Attached patch Patch v1.Splinter Review
Attachment #639110 - Flags: review?(taras.mozilla)
Blocks: 770911
Target Milestone: --- → mozilla16
Comment on attachment 639110 [details] [diff] [review]
Patch v1.

This looks ok
Attachment #639110 - Flags: review?(taras.mozilla) → review+
I tested this on Oak and it's working as it should.  I'll push this out in a couple days.
QA Contact: jsmith
Whiteboard: [qa+]
https://hg.mozilla.org/mozilla-central/rev/d00ae2e9b92a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
On a 7/15 inbound build, this isn't working for me on my home laptop (Win 7 32-bit). Info:

- In C:\Windows\Prefetch, there is one FIREFOX.PF file that is 0 KB and read only
- I've been running my browser for more than 20 minutes
- Maintenance service log only shows no activity by the prefetch service (no prefetch-like statements in the logs)
- The pref "app.update.service.lastVersionPrefetchCleared" is set to 16.0a1

Any ideas? I'll test on another machine tomorrow to confirm.
(In reply to Jason Smith [:jsmith] from comment #6)
> On a 7/15 inbound build, this isn't working for me on my home laptop (Win 7
> 32-bit). Info:
> 
> - In C:\Windows\Prefetch, there is one FIREFOX.PF file that is 0 KB and read
> only
> - I've been running my browser for more than 20 minutes
> - Maintenance service log only shows no activity by the prefetch service (no
> prefetch-like statements in the logs)
> - The pref "app.update.service.lastVersionPrefetchCleared" is set to 16.0a1
> 
> Any ideas? I'll test on another machine tomorrow to confirm.

Oh wait, I figured out the issue I hit. Resetting the pref caused the prefetch service to activate, resulting in removing the one Firefox PF 0 KB read only file.
So that verifies then for Windows 7 on inbound for the basic sanity test (wipe pref and see if prefetch file is wiped that is read only). Others to test:

- Windows XP - Basic sanity test for wiping prefetch files that are 0 KB and read only
- Windows Vista - Basic sanity test for wiping prefetch files that are 0 KB and read only
- Windows 7 - Update from FF 16 Nightly (prefetch enabled) to FF 17 Nightly (prefetch removal enabled), ensure wiping occurs
- Windows 7 - Switch from FF 16 Nightly (prefetch enabled) to FF 16 Aurora (prefetch removal enabled), ensure wiping occurs
- Windows 7 - Install FF 17 Nightly with prefetch files that > 0 KB, not read only, ensure that they are not wiped when prefetch service turns on
Cool, ya this won't auto trigger for people until the migration.
Random question since we're doing cleanup tasks in these bugs - what are we going to do about the registry key that's created? Specifically:

HKEYLOCALMACHINE\SOFTWARE\Mozilla\MaintenanceService\FFPrefetchDisabled
My plan was nothing :) If you uninstall the service it will be removed.  But if you want you can post for that and I'll implement something to handle it.
Tests Passed:

- Windows 7 - Basic sanity test for wiping prefetch files that are 0 KB and read only (pass)
- Windows XP - Basic sanity test for wiping prefetch files that are 0 KB and read only (pass)
- Windows Vista - Basic sanity test for wiping prefetch files that are 0 KB and read only (pass)
- Windows XP - Install FF 16 Nightly with prefetch files that > 0 KB, not read only, ensure that they are not wiped when prefetch service turns on (pass)
- Windows Vista - Update from FF 16 Nightly (prefetch enabled) to FF 17 Nightly (prefetch removal enabled), ensure wiping occurs (pass)

Tests still need to be run (will be done when next FF 16 Aurora build is available):

- Windows 7 - Switch from FF 16 Nightly (prefetch enabled) to FF 16 Aurora (prefetch removal enabled), ensure wiping occurs
Last test passes. Marking as verified. Will file a followup for the cleaning up registry issue.
Status: RESOLVED → VERIFIED
Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.