TS-2374: abort the producer to avoid httpsm hung if none of it`s consumer is alive.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/ae51d4ed Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/ae51d4ed Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/ae51d4ed Branch: refs/heads/5.0.x Commit: ae51d4ed7b1bf4e162b2c26819b5a88c5cf9ece4 Parents: 9f05ebe Author: weijin <[email protected]> Authored: Thu Nov 21 11:18:42 2013 +0800 Committer: weijin <[email protected]> Committed: Thu Nov 21 11:23:25 2013 +0800 ---------------------------------------------------------------------- CHANGES | 2 ++ proxy/http/HttpSM.cc | 3 +++ 2 files changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ae51d4ed/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 24a9ac5..445a6c3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2374] Abort the producer if the none of it`s consumers is alive. + *) [TS-2327] TSRedirectUrlSet does not perform DNS lookup of redirected OS *) [TS-1468] Check vary and accept headers on non-200 responses in cache http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ae51d4ed/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index a957bcb..503ac9b 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3249,6 +3249,9 @@ HttpSM::tunnel_handler_cache_write(int event, HttpTunnelConsumer * c) HTTP_INCREMENT_TRANS_STAT(http_cache_write_errors); DebugSM("http", "[%" PRId64 "] aborting cache write due %s event from cache", sm_id, HttpDebugNames::get_event_name(event)); + // abort the producer if the cache_writevc is the only consumer. + if (c->producer->alive && c->producer->num_consumers == 1) + tunnel.chain_abort_all(c->producer); break; case VC_EVENT_WRITE_COMPLETE: // if we've never initiated a cache write
