Closed Bug 444807 Opened 16 years ago Closed 15 years ago

Propagate opportunistic caching to all matching caches

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mayhemer, Assigned: mayhemer)

References

Details

Attachments

(1 file, 1 obsolete file)

Plus ensure reference integrity of data binding (files might be referenced more then ones).
Depends on: 442813
No longer depends on: 442812
Attached 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)
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).
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.
Attached 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)
Opportunistic caching was removed from the spec, WONTFIXing.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Attachment #338724 - Flags: review?(dcamp)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: