mStorageInUse grows faster than required if we update files in cache

VERIFIED FIXED in M18

Status

()

Core
Networking: Cache
P2
normal
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: Suresh Duddi (gone), Assigned: neeti)

Tracking

Trunk
Other
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3+][pdtp2])

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
<file already in cache. we hit reload after modifying (decreasing size) say> 
mStorageInUse += newFileSize - (newFileSize - oldFileSize) 

This could grow our notion of cache size faster than the cache actually is 
growing.
(Reporter)

Comment 1

18 years ago
When evicting this could be a reason for going into infinite loop ???
Status: NEW → ASSIGNED
Keywords: nsbeta3
Priority: P3 → P2
Whiteboard: [nsbeta3+]

Comment 2

18 years ago
Strange.
mStorageInUse += newFileSize - (newFileSize - oldFileSize)
is equivalent with
mStorageInUse += oldFileSize
(Reporter)

Comment 3

18 years ago
Thats a good one :-) My mistake in swapping old and newfile size in the formula.

<file already in cache. we hit reload after modifying (decreasing size) say>
mStorageInUse += newFileSize - (oldFileSize - newFileSize)

(Reporter)

Comment 4

18 years ago
Reassingning to neeti so this will show up on the right radar.
Assignee: dp → neeti
Status: ASSIGNED → NEW
(Reporter)

Updated

18 years ago
Status: NEW → ASSIGNED

Comment 5

18 years ago
pdt agrees p2 on the assumption that something bad like the infinite loop can 
happen easily.
Whiteboard: [nsbeta3+] → [nsbeta3+][pdtp2]
Target Milestone: --- → M18
(Assignee)

Comment 6

18 years ago
Created attachment 15247 [details]
attached patch for the fix
(Assignee)

Comment 7

18 years ago
Checked in a fix
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
I'm baffled by the algebra here.

/be
(Reporter)

Comment 9

18 years ago
Of course you are.

Comment 10

17 years ago
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.