Created by Alex Rousskov and last modified

This branch contains various Squid features that were developed after v3.0 freeze date. These features are expected to be ported to Squid v3.1 and/or submitted for v3.2 inclusion.

Get this branch:
bzr branch lp:~rousskov/squid/3p0-plus
Only Alex Rousskov can upload to this branch. If you are Alex Rousskov please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Alex Rousskov

Recent revisions

8959. By Alex Rousskov

Moved comm_local_port TODO comment from pconn reuse code to comm_open() call:
When we reuse a pconn, the F->local_port is already available if it was
computed before.

8958. By Alex Rousskov

Added %<lp logformat code to record the local port number of the last HTTP
server or peer connection.

8957. By Alex Rousskov

Synchronized diverged copies of the branch.

8956. By Alex Rousskov

Updating initial icap_oldest_service_failure implementation (r8951) to
match official Squid code which uses enhanced icap_service_failure_limit.

Also, r8951 lacked FadingCounter.{cc,h} files and related bootstrapping
changes. Correctly adding FadingCounter.{cc,h} files is difficult
because of the test case dependencies. We now include the contents of
those files directly into ICAP files that use it.

8955. By Alex Rousskov

Fixed store_client.cc:430: "STORE_DISK_CLIENT == getType()" assertion

Merged from v3.0 r9140.

8954. By Alex Rousskov

Author: Marko <email address hidden>
Bug 2496: Downloading some variants in full before relaying

AKA, assertion failed: comm.cc:115: "ccb->active == false"
if the client disconnected before download finished arriving.

Merged from parent (v3.0 r9158)

8953. By Alex Rousskov

Fixed header accounting to avoid the "Headers[id].stat.aliveCount" assertion.

We were incrementing the alive header field counter twice for each decrement,
which probably resulted in the alive counter wrapping back to zero, triggering
the assertion.

Merged from 3p1-rock r9602.

8952. By Alex Rousskov

Fixed comm.cc:152: "ccb->active()" assertion related to the automatic
write timeout.

We need to manually cancel writer's interest in select(2) before calling back
so that select() does not try to call the write handler when there is no
active callback anymore. Normally, select() cancels writer's interest when
calling the write handler, but in this case the call back is triggered not
from select() but from checkTimeouts().

Ported from 3p1-rock r9597.

8951. By Alex Rousskov

Added icap_oldest_service_failure option to forget old ICAP errors.

A busy or remote ICAP server may produce a steady but shallow stream of
errors. Any ICAP server may become nearly unusable in a short period of
time, producing a burst of errors. To avoid disabling a generally usable
service, it is important to distinguish these two cases. Just counting
the number of errors and suspending the service after
icap_service_failure_limit is reached often either suspends the service
in both cases or never suspends it at all, depending on the option

One way to distinguish a large burst of errors from a steady but shallow
error stream is to forget about old errors. The added
icap_oldest_service_failure option instructs Squid to ignore errors that
are "too old" to be counted as a part of a burst.

Another way to look at this feature is to say that the combination of
the old icap_service_failure_limit and the new
icap_oldest_service_failure limits the ICAP error _rate_. For example,
   # suspend service usage after 10 failures in 5 seconds:
   icap_service_failure_limit 10
   icap_oldest_service_failure 5 seconds

Squid does not remember every transaction error that occurred within the
allowed "oldest error" time period. That would be result in a precise
but too expensive implementation, especially during error bursts on a
busy server. Instead, Squid divides the period in ten slots, counts the
number of errors that occurred in each slot, and forget the oldest
slot(s) as needed. Thus, the algorithm has about 90% precision as far as
timing of the failures is concerned. That 90% precision ought to be good
enough for any deployment.

8950. By Alex Rousskov

Revised ClientSocketContext::abort API to handle propagation of both abort and
timeout conditions. With this change, Comm's ETIMEDOUT error reaches

TODO: The server side would benefit from similar timeout/abort checks but it
may be difficult to propagate them to al.http from there and most server-side
errors are probably already logged as such.

Branch metadata

Branch format:
Branch format 6
Repository format:
Bazaar pack repository format 1 (needs bzr 0.92)
This branch contains Public information 
Everyone can see this information.