Closed Bug 51095 Opened 24 years ago Closed 24 years ago

mStorageInUse grows faster than required if we update files in cache

Categories

(Core :: Networking: Cache, defect, P2)

Other
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dp, Assigned: neeti)

Details

(Whiteboard: [nsbeta3+][pdtp2])

Attachments

(1 file)

<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.
When evicting this could be a reason for going into infinite loop ???
Status: NEW → ASSIGNED
Keywords: nsbeta3
Priority: P3 → P2
Whiteboard: [nsbeta3+]
Strange.
mStorageInUse += newFileSize - (newFileSize - oldFileSize)
is equivalent with
mStorageInUse += oldFileSize
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)

Reassingning to neeti so this will show up on the right radar.
Assignee: dp → neeti
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
pdt agrees p2 on the assumption that something bad like the infinite loop can 
happen easily.
Whiteboard: [nsbeta3+] → [nsbeta3+][pdtp2]
Target Milestone: --- → M18
Checked in a fix
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I'm baffled by the algebra here.

/be
Of course you are.
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: