]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Initial Large Rock and Collapsed Forwarding support.
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 1 Jan 2014 20:13:23 +0000 (13:13 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 1 Jan 2014 20:13:23 +0000 (13:13 -0700)
Large Rock: Support disk (and shared memory) caching of responses exceeding
one db slot (or one shared memory page) in size. A single db slot/page size is
still limited to 32KB (smaller values can be configured for disk caches using
the newly added cache_dir slot-size option). Removal of old rock cache dir
(followed by squid-z) is required -- the on-disk db structure has changed.

Collapsed Forwarding: Optionally merge concurrent cachable requests for the
same URI earlier: After the request headers have been parsed (as before), but
now _before_ the response headers have been received. Merging of requests
received by different SMP workers is supported. Controlled by the new
collapsed_forwarding directive in squid.conf. Disabled by default because all
but one of the merged requests have to be delayed (until the response headers
are received) for the merging to work, which may be worse than forwarding all
concurrent requests immediately. The overall feature idea and request
eligibility conditions are based on Collapsed Forwarding in Squid2.

Summary of other important changes (merged branch log contains the details):

* Tightened StoreEntry locking. Split StoreEntry::lock() into "just lock" and
  "update entry reference time" interfaces, addressing an old XXX.  Improved
  entry lock/unlock debugging. Needs more work.

* Adjusted StoreIOState::write() API to allow callers detect write errors.

* Simplified MemObject::write() API to remove an essentially unused callback.

* Mark client streams that sent everything as STREAM_COMPLETE. The old code
  used STREAM_UNPLANNED_COMPLETE if the completed stream was associated with a
  non-persistent connection, which did not make sense to me and, IIRC, led to
  store entry aborts even though the entries were not damaged in any way.

* mem_hdr::hasContigousContentRange() now returns true for empty ranges.

* Support "appending" ReadWriteLock state that can be shared by readers and
  the writer. The writer promises not to update key metadata (except growing
  object size and next pointers) and readers promise to be careful when
  reading growing slices.

* Fixed StoreEntry::mayStartSwapOut() logic to handle terminated swapouts.

* Improved STORE_MEM_CLIENT detection and documented known (and mostly old)
  StoreEntry::storeClientType() problems.

* Removed StoreEntry::hidden_mem_obj hack.

* Polished StoreEntry debugging to report more info, less noise. Use e: prefix.

* Added a script to extract store entry(ies) debugging from cache.log.


Trivial merge