Propagate opportunistic caching to all matching caches

RESOLVED WONTFIX

Status

()

defect
RESOLVED WONTFIX
11 years ago
11 years ago

People

(Reporter: mayhemer, Assigned: mayhemer)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

11 years ago
Plus ensure reference integrity of data binding (files might be referenced more then ones).
Assignee

Updated

11 years ago
Depends on: 442813
No longer depends on: 442812
Assignee

Comment 1

11 years ago
Posted patch Fix, v1 (obsolete) — Splinter Review
Relatively simple patch reintroducing REPLACE INTO statement for key duplication. I added count check when calling the eviction function. It then bypasses when there are more references to a file (key+generation). 

IMHO it is cheapest way to do this. Refcounting means updating a table or  a column every time a new file is added and reading that table/column to check the refcount. Checking the count at moment of a row deletion is in 99% very fast (using index on the key column and scan of all -in most cases just one- present generations) and also safe way to have a number of references.
Attachment #329236 - Flags: review?(dcamp)
Assignee

Comment 2

11 years ago
The statement is IMHO wrong. If the entry is already present in another cache its ItemType flags are overwritten with the ItemType of the entry we propagate. We need separate INSERT and UPDATE statements or use some construction with LEFT OUTER JOIN (just guessing).
Assignee

Comment 3

11 years ago
Don't forget to add "Flags INTEGER DEFAULT 0" to set flags to 0 when new rows are added but existing flags are not rewritten.
Assignee

Comment 4

11 years ago
Posted patch Fix, v2Splinter Review
This is fixed version that preserves original flags. I am using two separate statements, one to propagate the new entry to all matching caches and one to set the OPPORTUNISTIC bit on all of them.

Both statements are optimal.
Attachment #329236 - Attachment is obsolete: true
Attachment #338724 - Flags: review?(dcamp)
Attachment #329236 - Flags: review?(dcamp)

Comment 5

11 years ago
Opportunistic caching was removed from the spec, WONTFIXing.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX

Updated

11 years ago
Attachment #338724 - Flags: review?(dcamp)
You need to log in before you can comment on or make changes to this bug.