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/07/08 22:55:11 UTC

[trafficserver] branch 6.2.x updated: TS-4472 Fixes http_current_active_client_connections_stat metric

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

The following commit(s) were added to refs/heads/6.2.x by this push:
       new  57af700   TS-4472 Fixes http_current_active_client_connections_stat metric
57af700 is described below

commit 57af7007ed8cd8fdcdb7b6846f085d9a6b84c288
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Fri Jul 8 07:38:56 2016 -0600

    TS-4472 Fixes http_current_active_client_connections_stat metric
    
    The issue here is that there are two m_active member variables, in
    both Http1ClientSession and Http1ClientTransaction. However, the former
    contains the latter, so this patch eliminates the m_active from the
    session class, and then consistently sets and checks the m_active from
    the http1ClientTransaction class.
    
    (cherry picked from commit 1db2d3aee58eda4806d5d7f27e953d69cb882741)
    
     Conflicts:
    	proxy/http/Http1ClientSession.cc
---
 proxy/http/Http1ClientSession.cc | 11 +++++------
 proxy/http/Http1ClientSession.h  |  5 -----
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/proxy/http/Http1ClientSession.cc b/proxy/http/Http1ClientSession.cc
index d83ac1b..23fa7b8 100644
--- a/proxy/http/Http1ClientSession.cc
+++ b/proxy/http/Http1ClientSession.cc
@@ -74,8 +74,7 @@ Http1ClientSession::Http1ClientSession()
     ka_vio(NULL),
     slave_ka_vio(NULL),
     outbound_port(0),
-    f_outbound_transparent(false),
-    m_active(false)
+    f_outbound_transparent(false)
 {
 }
 
@@ -229,8 +228,8 @@ Http1ClientSession::do_io_close(int alerrno)
 {
   if (read_state == HCS_ACTIVE_READER) {
     HTTP_DECREMENT_DYN_STAT(http_current_client_transactions_stat);
-    if (m_active) {
-      m_active = false;
+    if (trans.m_active) {
+      trans.m_active = false;
       HTTP_DECREMENT_DYN_STAT(http_current_active_client_connections_stat);
     }
   }
@@ -469,8 +468,8 @@ Http1ClientSession::attach_server_session(HttpServerSession *ssession, bool tran
     ink_assert(ssession->get_netvc() != this->get_netvc());
 
     // handling potential keep-alive here
-    if (m_active) {
-      m_active = false;
+    if (trans.m_active) {
+      trans.m_active = false;
       HTTP_DECREMENT_DYN_STAT(http_current_active_client_connections_stat);
     }
     // Since this our slave, issue an IO to detect a close and
diff --git a/proxy/http/Http1ClientSession.h b/proxy/http/Http1ClientSession.h
index 613717d..0cbe77a 100644
--- a/proxy/http/Http1ClientSession.h
+++ b/proxy/http/Http1ClientSession.h
@@ -203,11 +203,6 @@ public:
   /// Transparently pass-through non-HTTP traffic.
   bool f_transparent_passthrough;
 
-  // for DI. An active connection is one that a request has
-  // been successfully parsed (PARSE_DONE) and it remains to
-  // be active until the transaction goes through or the client
-  // aborts.
-  bool m_active;
   Http1ClientTransaction trans;
 };
 

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