]> git.ipfire.org Git - thirdparty/squid.git/commit - src/Transients.cc
Several fixes and improvements to help collapsed forwarding work reliably:
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 1 Jul 2013 02:25:50 +0000 (20:25 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 1 Jul 2013 02:25:50 +0000 (20:25 -0600)
commit6919be24f39ca407578092aed8fcd23b744f5c3c
treed3c6da8046da90c1598b0cfc7c7a7ceea5014ac2
parent1bfe9adea57c6187029a014f0fa5c77ac39d74aa
Several fixes and improvements to help collapsed forwarding work reliably:

Removed ENTRY_CACHABLE. AFAICT, it was just negating RELEASE_REQUEST AFAICT.

Broadcast transients index instead of key because key may become private.

Squid uses private keys to resolve store_table collisions (among other
things). Thus, a public entry may become private at any time, at any worker.
Using keys results in collapsed entries getting stuck waiting for an update.
The transients index remains constant and can be used for reliable
synchronization.

Using transient index, however, requires storing a pointer to the transient
entry corresponding to that index. Otherwise, there is no API to find the
entry object when a notification comes: Store::Root().get() needs a key.

Mark an entry for release when setting its key from public to private. The old
code was only logging SWAP_LOG_DEL, but we now need to prevent requests in
other workers from collapsing on top of a now-private cache entry. In many
cases, such an entry is in trouble (but not all cases because private keys are
also used for store_table collision resolution).

Fixed syncing of abandoned entries.

Prevent new requests from collapsing on writer-less transient entries.
20 files changed:
src/CollapsedForwarding.cc
src/MemStore.cc
src/Store.h
src/SwapDir.h
src/Transients.cc
src/Transients.h
src/enums.h
src/fs/coss/store_dir_coss.cc
src/fs/rock/RockSwapDir.cc
src/fs/ufs/UFSSwapDir.cc
src/ftp.cc
src/gopher.cc
src/http.cc
src/stat.cc
src/store.cc
src/store_digest.cc
src/store_dir.cc
src/tests/testStoreController.cc
src/tests/testStoreHashIndex.cc
src/whois.cc