You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2016/05/02 04:17:45 UTC

[trafficserver] branch 6.2.x updated (12084df -> c754bc3)

This is an automated email from the ASF dual-hosted git repository.

sorber pushed a change to branch 6.2.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.

      from  12084df   TS-4361: Remove TS_FETCH_EVENT handlers from Http2ClientSession. This closes #581.
       new  377ffdc   TS-4364: Address remnants from HTTP/2 refactoring.  This closes #584.
       new  556a0f9   TS-3429: Fix reference counting for TSContScheduleEvery.  This closes #576.
       new  7bf7330   TS-4355: Change assert condition for TS-3612
       new  c754bc3   TS-4378:  Remove periodic warning.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 proxy/InkAPI.cc                 | 12 ++++++++++--
 proxy/ProxyClientTransaction.cc | 17 +++++++++++++++++
 proxy/http/HttpTransact.cc      |  5 +++--
 proxy/http/HttpTunnel.cc        |  2 +-
 proxy/http2/Http2Stream.h       |  2 +-
 5 files changed, 32 insertions(+), 6 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].

[trafficserver] 02/04: TS-3429: Fix reference counting for TSContScheduleEvery. This closes #576.

Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch 6.2.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 556a0f9717eb10cdd20d8659bc605bdb10c27ad0
Author: shinrich <sh...@yahoo-inc.com>
AuthorDate: Mon Apr 18 10:15:16 2016 -0500

    TS-3429: Fix reference counting for TSContScheduleEvery.  This closes #576.
    
    (cherry picked from commit 3286600d90be4b6291b35867720adbd864f580ea)
---
 proxy/InkAPI.cc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 693aa62..1b40c28 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -991,7 +991,16 @@ INKContInternal::handle_event(int event, void *edata)
       Warning("INKCont Deletable but not deleted %d", m_event_count);
     }
   } else {
-    return m_event_func((TSCont)this, (TSEvent)event, edata);
+    int retval = m_event_func((TSCont)this, (TSEvent)event, edata);
+    if (edata && event == EVENT_INTERVAL) {
+      Event *e = reinterpret_cast<Event *>(edata);
+      if (e->period != 0) {
+        // In the interval case, we must re-increment the m_event_count for
+        // the next go around.  Otherwise, our event count will go negative.
+        ink_release_assert(ink_atomic_increment((int *)&this->m_event_count, 1) >= 0);
+      }
+    }
+    return retval;
   }
   return EVENT_DONE;
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 01/04: TS-4364: Address remnants from HTTP/2 refactoring. This closes #584.

Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch 6.2.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 377ffdc65978dd10344dd4a3bcef0677f8263a4e
Author: shinrich <sh...@yahoo-inc.com>
AuthorDate: Tue Apr 19 09:40:20 2016 -0500

    TS-4364: Address remnants from HTTP/2 refactoring.  This closes #584.
    
    (cherry picked from commit 2a1c3996d1641bd246faf39a171b330ac33da34c)
---
 proxy/ProxyClientTransaction.cc | 17 +++++++++++++++++
 proxy/http/HttpTransact.cc      |  5 +++--
 proxy/http2/Http2Stream.h       |  2 +-
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/proxy/ProxyClientTransaction.cc b/proxy/ProxyClientTransaction.cc
index af72bc8..98c6ab5 100644
--- a/proxy/ProxyClientTransaction.cc
+++ b/proxy/ProxyClientTransaction.cc
@@ -23,6 +23,7 @@
 
 #include "http/HttpSM.h"
 #include "http/HttpServerSession.h"
+#include "Plugin.h"
 
 #define DebugHttpTxn(fmt, ...) DebugSsn(this, "http_txn", fmt, __VA_ARGS__)
 
@@ -44,6 +45,22 @@ ProxyClientTransaction::new_transaction()
   DebugHttpTxn("[%" PRId64 "] Starting transaction %d using sm [%" PRId64 "]", parent->connection_id(),
                parent->get_transact_count(), current_reader->sm_id);
 
+  // This is a temporary hack until we get rid of SPDY and can use virutal methods entirely
+  // to track protocol
+  PluginIdentity *pi = dynamic_cast<PluginIdentity *>(this->get_netvc());
+  if (pi) {
+    current_reader->plugin_tag = pi->getPluginTag();
+    current_reader->plugin_id = pi->getPluginId();
+  } else {
+    const char *protocol_str = this->get_protocol_string();
+    // We don't set the plugin_tag for http, though in future we should probably log http as protocol
+    if (strncmp("http", protocol_str, 4)) {
+      current_reader->plugin_tag = protocol_str;
+      // Since there is no more plugin, there is no plugin id for http/2
+      // We are copying along the plugin_tag as a standin for protocol name for logging
+      // and to detect a case in HttpTransaction (TS-3954)
+    }
+  }
   current_reader->attach_client_session(this, sm_reader);
 }
 
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 87763b6..1d24e43 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -6999,11 +6999,12 @@ HttpTransact::handle_response_keep_alive_headers(State *s, HTTPVersion ver, HTTP
     // to the client to keep the connection alive.
     // Insert a Transfer-Encoding header in the response if necessary.
 
-    // check that the client is HTTP 1.1 and the conf allows chunking
+    // check that the client is HTTP 1.1 and the conf allows chunking or the client
+    // protocol unchunks before returning to the user agent (i.e. is spdy or http/2)
     if (s->client_info.http_version == HTTPVersion(1, 1) &&
         (s->txn_conf->chunking_enabled == 1 ||
          (s->state_machine->plugin_tag &&
-          (!strcmp(s->state_machine->plugin_tag, "http/2") || !strncmp(s->state_machine->plugin_tag, "spdy", 4)))) &&
+          (!strncmp(s->state_machine->plugin_tag, "http/2", 6) || !strncmp(s->state_machine->plugin_tag, "spdy", 4)))) &&
         // if we're not sending a body, don't set a chunked header regardless of server response
         !is_response_body_precluded(s->hdr_info.client_response.status_get(), s->method) &&
         // we do not need chunked encoding for internal error messages
diff --git a/proxy/http2/Http2Stream.h b/proxy/http2/Http2Stream.h
index d4d77e6..6c701d0 100644
--- a/proxy/http2/Http2Stream.h
+++ b/proxy/http2/Http2Stream.h
@@ -194,7 +194,7 @@ public:
   virtual const char *
   get_protocol_string() const
   {
-    return "http2";
+    return "http/2";
   }
 
   virtual void set_active_timeout(ink_hrtime timeout_in);

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 03/04: TS-4355: Change assert condition for TS-3612

Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch 6.2.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 7bf73303bf325b83492c43b58d9241e20a71c475
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Apr 25 11:12:17 2016 +0900

    TS-4355: Change assert condition for TS-3612
    
    Originally, the condition of assert in HttpTunnel::main_handler(int event, void *data)
    was same to the condition in HttpTunnel::get_consumer(VIO *vio) before TS-3612.
    This commit makes the condition in HttpTunnel::main_handler(int event, void *data)
    same as condition in HttpTunnel::get_consumer(VIO *vio).
    
    (cherry picked from commit 37f7c05de574458d2eff781d9f047673cda97a4e)
---
 proxy/http/HttpTunnel.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index 0bd3f4c..3b9267a 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -1568,7 +1568,7 @@ HttpTunnel::main_handler(int event, void *data)
     sm_callback = producer_handler(event, p);
   } else {
     if ((c = get_consumer((VIO *)data)) != 0) {
-      ink_assert(c->write_vio == (VIO *)data);
+      ink_assert(c->write_vio == (VIO *)data || c->vc == ((VIO *)data)->vc_server);
       sm_callback = consumer_handler(event, c);
     } else {
       internal_error(); // do nothing

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 04/04: TS-4378: Remove periodic warning.

Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch 6.2.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit c754bc35de1ce5d5984990ab07f5ef8588743615
Author: shinrich <sh...@yahoo-inc.com>
AuthorDate: Tue Apr 26 15:33:10 2016 -0500

    TS-4378:  Remove periodic warning.
    
    (cherry picked from commit 13a20c199803aae734b634da425340c72cf10b26)
---
 proxy/InkAPI.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 1b40c28..48a1bad 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -958,7 +958,6 @@ INKContInternal::destroy()
       ink_assert(!"not reached");
     }
     this_ethread()->schedule_imm(this);
-    Warning("INKCont not deletable %d %p", m_event_count, this);
   }
 }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.