--------------------- PatchSet 4388 Date: 2007/04/25 20:21:53 Author: rousskov Branch: squid3-icap Tag: (none) Log: If a consumer leaves without consuming anything, do not tell the producer that the consumer has aborted. This change increases the risk that, due to bugs, no [other] consumer will come and the producer will get stuck waiting for the buffer space. However, this risk should be mitigated by timeouts because no amount of code can ensure eventual consumer presence if producer and consumer are asynchronous. This change was needed to support ICAP transaction retries. When a transaction aborts due to pconn race conditions, without consuming body buffer, the second transaction will start from scratch and become the body consumer. Members: src/BodyPipe.cc:1.1.2.5->1.1.2.6 Index: squid3/src/BodyPipe.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/BodyPipe.cc,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- squid3/src/BodyPipe.cc 8 Mar 2007 22:10:35 -0000 1.1.2.5 +++ squid3/src/BodyPipe.cc 25 Apr 2007 20:21:53 -0000 1.1.2.6 @@ -145,7 +145,7 @@ if (theConsumer) { debugs(91,7, HERE << "clearing consumer" << status()); theConsumer = NULL; - if (!exhausted()) + if (consumedSize() && !exhausted()) AsyncCall(91,5, this, BodyPipe::tellBodyConsumerAborted); } }