trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shinr...@apache.org
Subject trafficserver git commit: TS-3665: Redirect logic causing debug asserts
Date Tue, 09 Jun 2015 13:17:13 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 2ba32dab4 -> e46eea5f1


TS-3665: Redirect logic causing debug asserts


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e46eea5f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e46eea5f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e46eea5f

Branch: refs/heads/master
Commit: e46eea5f1eee107a19a8412fef8b967a2f162457
Parents: 2ba32da
Author: shinrich <shinrich@yahoo-inc.com>
Authored: Tue Jun 9 08:16:47 2015 -0500
Committer: shinrich <shinrich@yahoo-inc.com>
Committed: Tue Jun 9 08:16:47 2015 -0500

----------------------------------------------------------------------
 proxy/http/HttpCacheSM.cc | 8 ++++++--
 proxy/http/HttpSM.cc      | 2 --
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e46eea5f/proxy/http/HttpCacheSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpCacheSM.cc b/proxy/http/HttpCacheSM.cc
index 1025796..ff02e3a 100644
--- a/proxy/http/HttpCacheSM.cc
+++ b/proxy/http/HttpCacheSM.cc
@@ -106,7 +106,11 @@ HttpCacheSM::state_cache_open_read(int event, void *data)
   switch (event) {
   case CACHE_EVENT_OPEN_READ:
     HTTP_INCREMENT_DYN_STAT(http_current_cache_connections_stat);
-    ink_assert(cache_read_vc == NULL);
+    ink_assert((cache_read_vc == NULL) || master_sm->t_state.redirect_info.redirect_in_process);
+    if (cache_read_vc) {
+      // redirect follow in progress, close the previous cache_read_vc
+      close_read();
+    }
     open_read_cb = true;
     cache_read_vc = (CacheVConnection *)data;
     master_sm->handleEvent(event, data);
@@ -267,7 +271,7 @@ HttpCacheSM::open_write(URL *url, HTTPHdr *request, CacheHTTPInfo *old_info,
tim
 {
   SET_HANDLER(&HttpCacheSM::state_cache_open_write);
   ink_assert(pending_action == NULL);
-  ink_assert(cache_write_vc == NULL);
+  ink_assert((cache_write_vc == NULL) || master_sm->t_state.redirect_info.redirect_in_process);
   // INKqa12119
   open_write_cb = false;
   open_write_tries++;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e46eea5f/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 801e263..55c8c08 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -1544,7 +1544,6 @@ HttpSM::handle_api_return()
   case HttpTransact::SM_ACTION_REDIRECT_READ: {
     // Clean up from any communication with previous servers
     release_server_session();
-    // tunnel.deallocate_redirect_postdata_buffers();
 
     call_transact_and_set_next_state(HttpTransact::HandleRequest);
     break;
@@ -4434,7 +4433,6 @@ HttpSM::do_cache_prepare_action(HttpCacheSM *c_sm, CacheHTTPInfo *object_read_in
   bool restore_client_request = false;
 
   ink_assert(!pending_action);
-  ink_assert(c_sm->cache_write_vc == NULL);
 
   if (t_state.api_lock_url == HttpTransact::LOCK_URL_FIRST) {
     if (t_state.redirect_info.redirect_in_process) {


Mime
View raw message