]> git.ipfire.org Git - thirdparty/squid.git/commit - src/Transients.cc
Various fixes related to overlapping and collapsed entry caching.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 25 Jun 2013 16:06:37 +0000 (10:06 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 25 Jun 2013 16:06:37 +0000 (10:06 -0600)
commit99921d9d8301ad62d0a1075c556d2cb14d8147dd
tree1311fc81446f839069faab4724a32788c3e42420
parentca6d5de2b6e3cfed79679f959d2cb31ac069063f
Various fixes related to overlapping and collapsed entry caching.

Wrote Transients description, replacing an irrelevant copy-pasted comment.
Maintain proper transient entry locks, distinguishing reading and writing
cases.

Fixed transients synchronization logic. Store::get() must not return
incomplete from-cache entries, except for local or transient ones. Otherwise,
the returned entry will not be updated when its remote writer makes changes.

Marked entries fully loaded from the shared memory cache as STORE_OK.

Avoid caching ENTRY_SPECIAL in the shared memory cache for now. This is not
strictly necessary, I think, but it simplifies shared caching log when
triaging start-test-analyze test cases. The restriction can be removed
when ENTRY_SPECIAL generation code becomes shared cache-aware, for example.

Fixed copy-paste error in Transients::disconnect().

Changed CollapsedForwarding::Broadcast() profile in preparation for excluding
broadcasts for entries without remote readers.

Do not purge entire cache entries just because we have to trim their RAM
footprint. The old code assumed that non-swappable entries may not have any
other stored content (which is no longer correct because they may still reside
in the shared memory cache) so it almost made sense to purge them, but it is
possible for clients to use partial in-RAM data when serving range requests,
so we should not be purging unless there are other reasons to do that. This
may expose client-side bugs if the hit validation code is not checking for RAM
entries being incomplete.

Allow MemObject::trimUnSwappable() to be called when there is nothing to trim.
This used to be a special case in StoreEntry::trimMemory(), but we do not need
it anymore after the above change.

Added transient and shared memory indexes to StoreEntry debugging summaries.
12 files changed:
src/CollapsedForwarding.cc
src/CollapsedForwarding.h
src/MemObject.cc
src/MemObject.h
src/MemStore.cc
src/Store.h
src/SwapDir.h
src/Transients.cc
src/Transients.h
src/fs/rock/RockSwapDir.cc
src/store.cc
src/store_dir.cc