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

acanary pushed a commit to branch h1outbound
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/h1outbound by this push:
     new 99e02aa  ProxySsn con_id refactor
99e02aa is described below

commit 99e02aa16fd143d30eacbb15baefa482a0e471ff
Author: Aaron Canary <acan...@verizonmedia.com>
AuthorDate: Thu Nov 21 14:32:57 2019 -0600

    ProxySsn con_id refactor
    
    _connection_id -> _id
    rename connection_id() to get_id()
    rename cid to ssn_id
    Rename to _id because it is the session id in the session object.
    update traffic_dump test to match combined con_id
---
 proxy/ProxySession.cc                              |  4 ++--
 proxy/ProxySession.h                               | 12 +++++------
 proxy/ProxyTransaction.cc                          |  5 ++---
 proxy/http/Http1ClientSession.cc                   | 24 +++++++++++-----------
 proxy/http/Http1ServerSession.cc                   | 13 ++++++------
 proxy/http/Http1ServerSession.h                    |  1 -
 proxy/http/HttpSM.cc                               |  2 +-
 proxy/http/HttpSM.h                                |  6 +++---
 proxy/http/HttpSessionManager.cc                   | 14 ++++++-------
 proxy/http2/Http2ClientSession.cc                  | 21 +++++++++----------
 proxy/http2/Http2ConnectionState.cc                | 18 ++++++++--------
 proxy/http2/Http2Stream.cc                         |  8 ++++----
 proxy/http3/Http3Session.cc                        |  2 +-
 proxy/logging/LogAccess.cc                         |  2 +-
 src/traffic_server/InkAPI.cc                       |  2 +-
 .../pluginTest/traffic_dump/traffic_dump.test.py   |  2 +-
 16 files changed, 66 insertions(+), 70 deletions(-)

diff --git a/proxy/ProxySession.cc b/proxy/ProxySession.cc
index d3b7eb4..e1d622e 100644
--- a/proxy/ProxySession.cc
+++ b/proxy/ProxySession.cc
@@ -193,9 +193,9 @@ ProxySession::get_half_close_flag() const
 }
 
 int64_t
-ProxySession::connection_id() const
+ProxySession::get_id() const
 {
-  return con_id;
+  return _id;
 }
 
 void
diff --git a/proxy/ProxySession.h b/proxy/ProxySession.h
index f1036ee..37f1ee4 100644
--- a/proxy/ProxySession.h
+++ b/proxy/ProxySession.h
@@ -86,7 +86,7 @@ public:
   ProxySession(ProxySession &) = delete;
   ProxySession &operator=(const ProxySession &) = delete;
 
-  static int64_t next_connection_id();
+  static int64_t next_id();
 
   // Virtual Methods
   virtual void new_connection(NetVConnection *new_vc, MIOBuffer *iobuf, 
IOBufferReader *reader) = 0;
@@ -142,7 +142,7 @@ public:
   bool is_draining() const;
   bool is_client_closed() const;
 
-  int64_t connection_id() const;
+  int64_t get_id() const;
   TSHttpHookID get_hookid() const;
   bool has_hooks() const;
 
@@ -169,7 +169,7 @@ protected:
   bool debug_on   = false;
   bool in_destroy = false;
 
-  int64_t con_id        = 0;
+  int64_t _id           = 0;
   Event *schedule_event = nullptr;
 
 private:
@@ -190,12 +190,12 @@ private:
 ///////////////////
 // INLINE
 
-static inline int64_t next_cs_id = 0;
+static inline int64_t next_ssn_id = 0;
 
 inline int64_t
-ProxySession::next_connection_id()
+ProxySession::next_id()
 {
-  return ink_atomic_increment(&next_cs_id, 1);
+  return ink_atomic_increment(&next_ssn_id, 1);
 }
 
 inline void *
diff --git a/proxy/ProxyTransaction.cc b/proxy/ProxyTransaction.cc
index 73843e8..69f8b2b 100644
--- a/proxy/ProxyTransaction.cc
+++ b/proxy/ProxyTransaction.cc
@@ -40,7 +40,7 @@ ProxyTransaction::new_transaction()
   ink_release_assert(_proxy_ssn != nullptr);
   _sm = HttpSM::allocate();
   _sm->init();
-  HttpTxnDebug("[%" PRId64 "] Starting transaction %d using sm [%" PRId64 "]", 
_proxy_ssn->connection_id(),
+  HttpTxnDebug("[%" PRId64 "] Starting transaction %d using sm [%" PRId64 "]", 
_proxy_ssn->get_id(),
                _proxy_ssn->get_transact_count(), _sm->sm_id);
 
   PluginIdentity *pi = dynamic_cast<PluginIdentity *>(this->get_netvc());
@@ -56,8 +56,7 @@ ProxyTransaction::new_transaction()
 void
 ProxyTransaction::release(IOBufferReader *r)
 {
-  HttpTxnDebug("[%" PRId64 "] session released by sm [%" PRId64 "]", 
_proxy_ssn ? _proxy_ssn->connection_id() : 0,
-               _sm ? _sm->sm_id : 0);
+  HttpTxnDebug("[%" PRId64 "] session released by sm [%" PRId64 "]", 
_proxy_ssn ? _proxy_ssn->get_id() : 0, _sm ? _sm->sm_id : 0);
 
   this->decrement_client_transactions_stat();
 
diff --git a/proxy/http/Http1ClientSession.cc b/proxy/http/Http1ClientSession.cc
index d5b2269..f2d7f13 100644
--- a/proxy/http/Http1ClientSession.cc
+++ b/proxy/http/Http1ClientSession.cc
@@ -40,10 +40,10 @@
 
 #define HttpSsnDebug(fmt, ...) SsnDebug(this, "http_cs", fmt, __VA_ARGS__)
 
-#define STATE_ENTER(state_name, event, vio)                                    
                         \
-  do {                                                                         
                         \
-    /*ink_assert (magic == HTTP_SM_MAGIC_ALIVE);  REMEMBER (event, NULL, 
reentrancy_count); */          \
-    HttpSsnDebug("[%" PRId64 "] [%s, %s]", con_id, #state_name, 
HttpDebugNames::get_event_name(event)); \
+#define STATE_ENTER(state_name, event, vio)                                    
                           \
+  do {                                                                         
                           \
+    /*ink_assert (magic == HTTP_SM_MAGIC_ALIVE);  REMEMBER (event, NULL, 
reentrancy_count); */            \
+    HttpSsnDebug("[%" PRId64 "] [%s, %s]", get_id(), #state_name, 
HttpDebugNames::get_event_name(event)); \
   } while (0)
 
 enum {
@@ -73,7 +73,7 @@ Http1ClientSession::destroy()
   if (!in_destroy) {
     in_destroy = true;
 
-    HttpSsnDebug("[%" PRId64 "] session destroy", con_id);
+    HttpSsnDebug("[%" PRId64 "] session destroy", get_id());
     ink_release_assert(!client_vc);
     ink_assert(read_buffer);
     ink_release_assert(transact_count == released_transactions);
@@ -143,7 +143,7 @@ Http1ClientSession::new_connection(NetVConnection *new_vc, 
MIOBuffer *iobuf, IOB
   ink_assert(lock.is_locked());
 
   // Unique client session identifier.
-  con_id = ProxySession::next_connection_id();
+  _id = ProxySession::next_id();
 
   schedule_event = nullptr;
 
@@ -181,7 +181,7 @@ Http1ClientSession::new_connection(NetVConnection *new_vc, 
MIOBuffer *iobuf, IOB
   ink_mutex_release(&debug_cs_list_mutex);
 #endif
 
-  HttpSsnDebug("[%" PRId64 "] session born, netvc %p", con_id, new_vc);
+  HttpSsnDebug("[%" PRId64 "] session born, netvc %p", get_id(), new_vc);
 
   client_vc->set_tcp_congestion_control(CLIENT_SIDE);
 
@@ -249,7 +249,7 @@ Http1ClientSession::do_io_close(int alerrno)
   if (half_close && this->trans.get_sm()) {
     read_state = HCS_HALF_CLOSED;
     SET_HANDLER(&Http1ClientSession::state_wait_for_close);
-    HttpSsnDebug("[%" PRId64 "] session half close", con_id);
+    HttpSsnDebug("[%" PRId64 "] session half close", get_id());
 
     if (client_vc) {
       // We want the client to know that that we're finished
@@ -275,7 +275,7 @@ Http1ClientSession::do_io_close(int alerrno)
     _reader->consume(_reader->read_avail());
   } else {
     read_state = HCS_CLOSED;
-    HttpSsnDebug("[%" PRId64 "] session closed", con_id);
+    HttpSsnDebug("[%" PRId64 "] session closed", get_id());
     HTTP_SUM_DYN_STAT(http_transactions_per_client_con, transact_count);
     HTTP_DECREMENT_DYN_STAT(http_current_client_connections_stat);
     conn_decrease = false;
@@ -424,10 +424,10 @@ Http1ClientSession::release(ProxyTransaction *trans)
   bool more_to_read = this->_reader->is_read_avail_more_than(0);
   if (more_to_read) {
     trans->destroy();
-    HttpSsnDebug("[%" PRId64 "] data already in buffer, starting new 
transaction", con_id);
+    HttpSsnDebug("[%" PRId64 "] data already in buffer, starting new 
transaction", get_id());
     new_transaction();
   } else {
-    HttpSsnDebug("[%" PRId64 "] initiating io for next header", con_id);
+    HttpSsnDebug("[%" PRId64 "] initiating io for next header", get_id());
     read_state = HCS_KEEP_ALIVE;
     SET_HANDLER(&Http1ClientSession::state_keep_alive);
     ka_vio = this->do_io_read(this, INT64_MAX, read_buffer);
@@ -470,7 +470,7 @@ 
Http1ClientSession::attach_server_session(Http1ServerSession *ssession, bool tra
     ink_assert(bound_ss == nullptr);
     ssession->state = HSS_KA_CLIENT_SLAVE;
     bound_ss        = ssession;
-    HttpSsnDebug("[%" PRId64 "] attaching server session [%" PRId64 "] as 
slave", con_id, ssession->con_id);
+    HttpSsnDebug("[%" PRId64 "] attaching server session [%" PRId64 "] as 
slave", get_id(), ssession->get_id());
     ink_assert(ssession->get_reader()->read_avail() == 0);
     ink_assert(ssession->get_netvc() != this->get_netvc());
 
diff --git a/proxy/http/Http1ServerSession.cc b/proxy/http/Http1ServerSession.cc
index 9f20dc4..8df8c1e 100644
--- a/proxy/http/Http1ServerSession.cc
+++ b/proxy/http/Http1ServerSession.cc
@@ -36,7 +36,6 @@
 #include "HttpSessionManager.h"
 #include "HttpSM.h"
 
-static int64_t next_ss_id = static_cast<int64_t>(0);
 ClassAllocator<Http1ServerSession> 
httpServerSessionAllocator("httpServerSessionAllocator");
 
 void
@@ -69,7 +68,7 @@ Http1ServerSession::new_connection(NetVConnection *new_vc)
   mutex = new_vc->mutex;
 
   // Unique client session identifier.
-  con_id = ink_atomic_increment((&next_ss_id), 1);
+  _id = ProxySession::next_id();
 
   magic = HTTP_MAGIC_ALIVE;
   HTTP_SUM_GLOBAL_DYN_STAT(http_current_server_connections_stat, 1); // Update 
the true global stat
@@ -78,7 +77,7 @@ Http1ServerSession::new_connection(NetVConnection *new_vc)
   read_buffer = new_MIOBuffer(HTTP_SERVER_RESP_HDR_BUFFER_INDEX);
 
   buf_reader = read_buffer->alloc_reader();
-  Debug("http_ss", "[%" PRId64 "] session born, netvc %p", con_id, new_vc);
+  Debug("http_ss", "[%" PRId64 "] session born, netvc %p", get_id(), new_vc);
   state = HSS_INIT;
 
   new_vc->set_tcp_congestion_control(SERVER_SIDE);
@@ -91,7 +90,7 @@ 
Http1ServerSession::enable_outbound_connection_tracking(OutboundConnTrack::Group
   conn_track_group = group;
   if (is_debug_tag_set("http_ss")) {
     ts::LocalBufferWriter<256> w;
-    w.print("[{}] new connection, ip: {}, group ({}), count: {}\0", con_id, 
get_server_ip(), *group, group->_count);
+    w.print("[{}] new connection, ip: {}, group ({}), count: {}\0", get_id(), 
get_server_ip(), *group, group->_count);
     Debug("http_ss", "%s", w.data());
   }
 }
@@ -126,7 +125,7 @@ Http1ServerSession::do_io_close(int alerrno)
   }
 
   if (debug_p) {
-    w.print("[{}] session close: nevtc {:x}", con_id, server_vc);
+    w.print("[{}] session close: nevtc {:x}", get_id(), server_vc);
   }
 
   HTTP_SUM_GLOBAL_DYN_STAT(http_current_server_connections_stat, -1); // Make 
sure to work on the global stat
@@ -141,7 +140,7 @@ Http1ServerSession::do_io_close(int alerrno)
       }
     } else {
       // A bit dubious, as there's no guarantee it's still negative, but even 
that would be interesting to know.
-      Error("[http_ss] [%" PRId64 "] number of connections should be greater 
than or equal to zero: %u", con_id,
+      Error("[http_ss] [%" PRId64 "] number of connections should be greater 
than or equal to zero: %u", get_id(),
             conn_track_group->_count.load());
     }
   }
@@ -242,4 +241,4 @@ const char *
 Http1ServerSession::get_protocol_string() const
 {
   return "http";
-};
\ No newline at end of file
+};
diff --git a/proxy/http/Http1ServerSession.h b/proxy/http/Http1ServerSession.h
index 5aeb225..5143acc 100644
--- a/proxy/http/Http1ServerSession.h
+++ b/proxy/http/Http1ServerSession.h
@@ -137,7 +137,6 @@ public:
   // Variables
   CryptoHash hostname_hash;
 
-  int64_t con_id     = 0;
   int transact_count = 0;
   HSS_State state    = HSS_INIT;
 
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 4672df6..b4d4eb7 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -496,7 +496,7 @@ HttpSM::attach_client_session(ProxyTransaction *client_vc, 
IOBufferReader *buffe
     auto p = ua_txn->get_proxy_ssn();
 
     if (p) {
-      _client_connection_id = p->connection_id();
+      _client_ssn_id = p->get_id();
     }
   }
 
diff --git a/proxy/http/HttpSM.h b/proxy/http/HttpSM.h
index 313c86f..15693e7 100644
--- a/proxy/http/HttpSM.h
+++ b/proxy/http/HttpSM.h
@@ -602,9 +602,9 @@ public:
   }
 
   int
-  client_connection_id() const
+  client_session_id() const
   {
-    return _client_connection_id;
+    return _client_ssn_id;
   }
 
   int
@@ -632,7 +632,7 @@ public:
 
 private:
   PostDataBuffers _postbuf;
-  int _client_connection_id = -1, _client_transaction_id = -1;
+  int _client_ssn_id = -1, _client_transaction_id = -1;
   int _client_transaction_priority_weight = -1, 
_client_transaction_priority_dependence = -1;
 };
 
diff --git a/proxy/http/HttpSessionManager.cc b/proxy/http/HttpSessionManager.cc
index 3667e6f..8bce23e 100644
--- a/proxy/http/HttpSessionManager.cc
+++ b/proxy/http/HttpSessionManager.cc
@@ -169,7 +169,7 @@ ServerSessionPool::releaseSession(Http1ServerSession *ss)
   Debug("http_ss",
         "[%" PRId64 "] [release session] "
         "session placed into shared pool",
-        ss->con_id);
+        ss->get_id());
 }
 
 //   Called from the NetProcessor to let us know that a
@@ -217,7 +217,7 @@ ServerSessionPool::eventHandler(int event, void *data)
           Debug("http_ss",
                 "[%" PRId64 "] [session_bucket] session received io notice 
[%s], "
                 "resetting timeout to maintain minimum number of connections",
-                s->con_id, HttpDebugNames::get_event_name(event));
+                s->get_id(), HttpDebugNames::get_event_name(event));
           
s->get_netvc()->set_inactivity_timeout(s->get_netvc()->get_inactivity_timeout());
           
s->get_netvc()->set_active_timeout(s->get_netvc()->get_active_timeout());
           found = true;
@@ -227,7 +227,7 @@ ServerSessionPool::eventHandler(int event, void *data)
 
       // We've found our server session. Remove it from
       //   our lists and close it down
-      Debug("http_ss", "[%" PRId64 "] [session_pool] session %p received io 
notice [%s]", s->con_id, s,
+      Debug("http_ss", "[%" PRId64 "] [session_pool] session %p received io 
notice [%s]", s->get_id(), s,
             HttpDebugNames::get_event_name(event));
       ink_assert(s->state == HSS_KA_SHARED);
       // Out of the pool! Now!
@@ -301,7 +301,7 @@ HttpSessionManager::acquire_session(Continuation * /* cont 
ATS_UNUSED */, sockad
     //
     if (ServerSessionPool::match(to_return, ip, hostname_hash, match_style) &&
         ServerSessionPool::validate_sni(sm, to_return->get_netvc())) {
-      Debug("http_ss", "[%" PRId64 "] [acquire session] returning attached 
session ", to_return->con_id);
+      Debug("http_ss", "[%" PRId64 "] [acquire session] returning attached 
session ", to_return->get_id());
       to_return->state = HSS_ACTIVE;
       sm->attach_server_session(to_return);
       return HSM_DONE;
@@ -311,7 +311,7 @@ HttpSessionManager::acquire_session(Continuation * /* cont 
ATS_UNUSED */, sockad
     Debug("http_ss",
           "[%" PRId64 "] [acquire session] "
           "session not a match, returning to shared pool",
-          to_return->con_id);
+          to_return->get_id());
     to_return->release();
     to_return = nullptr;
   }
@@ -369,7 +369,7 @@ HttpSessionManager::acquire_session(Continuation * /* cont 
ATS_UNUSED */, sockad
   }
 
   if (to_return) {
-    Debug("http_ss", "[%" PRId64 "] [acquire session] return session from 
shared pool", to_return->con_id);
+    Debug("http_ss", "[%" PRId64 "] [acquire session] return session from 
shared pool", to_return->get_id());
     to_return->state = HSS_ACTIVE;
     // the attach_server_session will issue the do_io_read under the sm lock
     sm->attach_server_session(to_return);
@@ -391,7 +391,7 @@ HttpSessionManager::release_session(Http1ServerSession 
*to_release)
   if (lock.is_locked()) {
     pool->releaseSession(to_release);
   } else {
-    Debug("http_ss", "[%" PRId64 "] [release session] could not release 
session due to lock contention", to_release->con_id);
+    Debug("http_ss", "[%" PRId64 "] [release session] could not release 
session due to lock contention", to_release->get_id());
     released_p = false;
   }
 
diff --git a/proxy/http2/Http2ClientSession.cc 
b/proxy/http2/Http2ClientSession.cc
index ed5069c..cca6df0 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -30,14 +30,13 @@
     this->remember(MakeSourceLocation(), e, r); \
   }
 
-#define STATE_ENTER(state_name, event)                                         
              \
-  do {                                                                         
              \
-    REMEMBER(event, this->recursion)                                           
              \
-    SsnDebug(this, "http2_cs", "[%" PRId64 "] [%s, %s]", 
this->connection_id(), #state_name, \
-             HttpDebugNames::get_event_name(event));                           
              \
+#define STATE_ENTER(state_name, event)                                         
                                               \
+  do {                                                                         
                                               \
+    REMEMBER(event, this->recursion)                                           
                                               \
+    SsnDebug(this, "http2_cs", "[%" PRId64 "] [%s, %s]", this->get_id(), 
#state_name, HttpDebugNames::get_event_name(event)); \
   } while (0)
 
-#define Http2SsnDebug(fmt, ...) SsnDebug(this, "http2_cs", "[%" PRId64 "] " 
fmt, this->connection_id(), ##__VA_ARGS__)
+#define Http2SsnDebug(fmt, ...) SsnDebug(this, "http2_cs", "[%" PRId64 "] " 
fmt, this->get_id(), ##__VA_ARGS__)
 
 #define HTTP2_SET_SESSION_HANDLER(handler) \
   do {                                     \
@@ -108,7 +107,7 @@ Http2ClientSession::free()
 
   // Slow Log
   if (Http2::con_slow_log_threshold != 0 && 
ink_hrtime_from_msec(Http2::con_slow_log_threshold) < total_time) {
-    Error("[%" PRIu64 "] Slow H2 Connection: open: %" PRIu64 " close: %.3f", 
this->con_id,
+    Error("[%" PRIu64 "] Slow H2 Connection: open: %" PRIu64 " close: %.3f", 
this->get_id(),
           ink_hrtime_to_msec(this->_milestones[Http2SsnMilestone::OPEN]),
           this->_milestones.difference_sec(Http2SsnMilestone::OPEN, 
Http2SsnMilestone::CLOSE));
   }
@@ -190,7 +189,7 @@ Http2ClientSession::new_connection(NetVConnection *new_vc, 
MIOBuffer *iobuf, IOB
   this->_milestones.mark(Http2SsnMilestone::OPEN);
 
   // Unique client session identifier.
-  this->con_id    = ProxySession::next_connection_id();
+  this->_id       = ProxySession::next_id();
   this->client_vc = new_vc;
   
client_vc->set_inactivity_timeout(HRTIME_SECONDS(Http2::accept_no_activity_timeout));
   this->schedule_event = nullptr;
@@ -343,7 +342,7 @@ Http2ClientSession::main_event_handler(int event, void 
*edata)
     bool is_zombie = connection_state.get_zombie_event() != nullptr;
     retval         = (this->*session_handler)(event, edata);
     if (is_zombie && connection_state.get_zombie_event() != nullptr) {
-      Warning("Processed read event for zombie session %" PRId64, 
connection_id());
+      Warning("Processed read event for zombie session %" PRId64, get_id());
     }
     break;
   }
@@ -404,7 +403,7 @@ Http2ClientSession::main_event_handler(int event, void 
*edata)
       const char *client_ip = ats_ip_ntop(get_client_addr(), ipb, sizeof(ipb));
       Error("HTTP/2 session error client_ip=%s session_id=%" PRId64
             " closing a connection, because its stream error rate (%f) 
exceeded the threshold (%f)",
-            client_ip, connection_id(), 
this->connection_state.get_stream_error_rate(), 
Http2::stream_error_rate_threshold);
+            client_ip, get_id(), 
this->connection_state.get_stream_error_rate(), 
Http2::stream_error_rate_threshold);
       Http2SsnDebug("Preparing for graceful shutdown because of a high stream 
error rate");
       cause_of_death = Http2SessionCod::HIGH_ERROR_RATE;
       this->connection_state.set_shutdown_state(HTTP2_SHUTDOWN_NOT_INITIATED, 
Http2ErrorCode::HTTP2_ERROR_ENHANCE_YOUR_CALM);
@@ -584,7 +583,7 @@ Http2ClientSession::state_process_frame_read(int event, VIO 
*vio, bool inside_fr
       const char *client_ip = ats_ip_ntop(get_client_addr(), ipb, sizeof(ipb));
       Error("HTTP/2 session error client_ip=%s session_id=%" PRId64
             " closing a connection, because its stream error rate (%f) is too 
high",
-            client_ip, connection_id(), 
this->connection_state.get_stream_error_rate());
+            client_ip, get_id(), 
this->connection_state.get_stream_error_rate());
       err = Http2ErrorCode::HTTP2_ERROR_ENHANCE_YOUR_CALM;
     }
 
diff --git a/proxy/http2/Http2ConnectionState.cc 
b/proxy/http2/Http2ConnectionState.cc
index 3e40f18..b09ce38 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -38,10 +38,10 @@
   }
 
 #define Http2ConDebug(ua_session, fmt, ...) \
-  SsnDebug(ua_session, "http2_con", "[%" PRId64 "] " fmt, 
ua_session->connection_id(), ##__VA_ARGS__);
+  SsnDebug(ua_session, "http2_con", "[%" PRId64 "] " fmt, 
ua_session->get_id(), ##__VA_ARGS__);
 
 #define Http2StreamDebug(ua_session, stream_id, fmt, ...) \
-  SsnDebug(ua_session, "http2_con", "[%" PRId64 "] [%u] " fmt, 
ua_session->connection_id(), stream_id, ##__VA_ARGS__);
+  SsnDebug(ua_session, "http2_con", "[%" PRId64 "] [%u] " fmt, 
ua_session->get_id(), stream_id, ##__VA_ARGS__);
 
 using http2_frame_dispatch = Http2Error (*)(Http2ConnectionState &, const 
Http2Frame &);
 
@@ -84,7 +84,7 @@ rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame 
&frame)
   Http2StreamDebug(cstate.ua_session, id, "Received DATA frame");
 
   if (cstate.get_zombie_event()) {
-    Warning("Data frame for zombied session %" PRId64, 
cstate.ua_session->connection_id());
+    Warning("Data frame for zombied session %" PRId64, 
cstate.ua_session->get_id());
   }
 
   // If a DATA frame is received whose stream identifier field is 0x0, the
@@ -385,7 +385,7 @@ rcv_priority_frame(Http2ConnectionState &cstate, const 
Http2Frame &frame)
   Http2StreamDebug(cstate.ua_session, stream_id, "Received PRIORITY frame");
 
   if (cstate.get_zombie_event()) {
-    Warning("Priority frame for zombied session %" PRId64, 
cstate.ua_session->connection_id());
+    Warning("Priority frame for zombied session %" PRId64, 
cstate.ua_session->get_id());
   }
 
   // If a PRIORITY frame is received with a stream identifier of 0x0, the
@@ -446,7 +446,7 @@ rcv_priority_frame(Http2ConnectionState &cstate, const 
Http2Frame &frame)
     if (is_debug_tag_set("http2_priority")) {
       std::stringstream output;
       cstate.dependency_tree->dump_tree(output);
-      Debug("http2_priority", "[%" PRId64 "] reprioritize %s", 
cstate.ua_session->connection_id(), output.str().c_str());
+      Debug("http2_priority", "[%" PRId64 "] reprioritize %s", 
cstate.ua_session->get_id(), output.str().c_str());
     }
   } else {
     // PRIORITY frame is received before HEADERS frame.
@@ -532,7 +532,7 @@ rcv_settings_frame(Http2ConnectionState &cstate, const 
Http2Frame &frame)
   Http2StreamDebug(cstate.ua_session, stream_id, "Received SETTINGS frame");
 
   if (cstate.get_zombie_event()) {
-    Warning("Setting frame for zombied session %" PRId64, 
cstate.ua_session->connection_id());
+    Warning("Setting frame for zombied session %" PRId64, 
cstate.ua_session->get_id());
   }
 
   // Update SETTIGNS frame count per minute
@@ -1021,7 +1021,7 @@ Http2ConnectionState::main_event_handler(int event, void 
*edata)
       if (error.cls == Http2ErrorClass::HTTP2_ERROR_CLASS_CONNECTION) {
         if (error.msg) {
           Error("HTTP/2 connection error code=0x%02x client_ip=%s 
session_id=%" PRId64 " stream_id=%u %s",
-                static_cast<int>(error.code), client_ip, 
ua_session->connection_id(), stream_id, error.msg);
+                static_cast<int>(error.code), client_ip, ua_session->get_id(), 
stream_id, error.msg);
         }
         this->send_goaway_frame(this->latest_streamid_in, error.code);
         this->ua_session->set_half_close_local_flag(true);
@@ -1034,7 +1034,7 @@ Http2ConnectionState::main_event_handler(int event, void 
*edata)
       } else if (error.cls == Http2ErrorClass::HTTP2_ERROR_CLASS_STREAM) {
         if (error.msg) {
           Error("HTTP/2 stream error code=0x%02x client_ip=%s session_id=%" 
PRId64 " stream_id=%u %s", static_cast<int>(error.code),
-                client_ip, ua_session->connection_id(), stream_id, error.msg);
+                client_ip, ua_session->get_id(), stream_id, error.msg);
         }
         this->send_rst_stream_frame(stream_id, error.code);
       }
@@ -1294,7 +1294,7 @@ Http2ConnectionState::delete_stream(Http2Stream *stream)
       if (is_debug_tag_set("http2_priority")) {
         std::stringstream output;
         dependency_tree->dump_tree(output);
-        Debug("http2_priority", "[%" PRId64 "] %s", 
ua_session->connection_id(), output.str().c_str());
+        Debug("http2_priority", "[%" PRId64 "] %s", ua_session->get_id(), 
output.str().c_str());
       }
       dependency_tree->remove(node);
       // ink_release_assert(dependency_tree->find(stream->get_id()) == 
nullptr);
diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc
index 8da3d86..5a9d2a4 100644
--- a/proxy/http2/Http2Stream.cc
+++ b/proxy/http2/Http2Stream.cc
@@ -34,7 +34,7 @@
   }
 
 #define Http2StreamDebug(fmt, ...) \
-  SsnDebug(_proxy_ssn, "http2_stream", "[%" PRId64 "] [%u] " fmt, 
_proxy_ssn->connection_id(), this->get_id(), ##__VA_ARGS__);
+  SsnDebug(_proxy_ssn, "http2_stream", "[%" PRId64 "] [%u] " fmt, 
_proxy_ssn->get_id(), this->get_id(), ##__VA_ARGS__);
 
 ClassAllocator<Http2Stream> http2StreamAllocator("http2StreamAllocator");
 
@@ -746,7 +746,7 @@ Http2Stream::destroy()
   ink_release_assert(this->closed);
   ink_release_assert(reentrancy_count == 0);
 
-  uint64_t cid = 0;
+  uint64_t ssn_id = 0;
 
   // Safe to initiate SSN_CLOSE if this is the last stream
   if (_proxy_ssn) {
@@ -759,7 +759,7 @@ Http2Stream::destroy()
     // Update session's stream counts, so it accurately goes into keep-alive 
state
     h2_proxy_ssn->connection_state.release_stream(this);
 
-    cid = _proxy_ssn->connection_id();
+    ssn_id = _proxy_ssn->get_id();
   }
 
   // Clean up the write VIO in case of inactivity timeout
@@ -780,7 +780,7 @@ Http2Stream::destroy()
           "tx_hdrs: %.3f "
           "tx_data: %.3f "
           "close: %.3f",
-          cid, static_cast<uint32_t>(this->_id), this->_http_sm_id,
+          ssn_id, static_cast<uint32_t>(this->_id), this->_http_sm_id,
           ink_hrtime_to_msec(this->_milestones[Http2StreamMilestone::OPEN]),
           this->_milestones.difference_sec(Http2StreamMilestone::OPEN, 
Http2StreamMilestone::START_DECODE_HEADERS),
           this->_milestones.difference_sec(Http2StreamMilestone::OPEN, 
Http2StreamMilestone::START_TXN),
diff --git a/proxy/http3/Http3Session.cc b/proxy/http3/Http3Session.cc
index e552f95..59ae406 100644
--- a/proxy/http3/Http3Session.cc
+++ b/proxy/http3/Http3Session.cc
@@ -93,7 +93,7 @@ HQSession::reenable(VIO *vio)
 void
 HQSession::new_connection(NetVConnection *new_vc, MIOBuffer *iobuf, 
IOBufferReader *reade)
 {
-  this->con_id = static_cast<QUICConnection 
*>(reinterpret_cast<QUICNetVConnection *>(new_vc))->connection_id();
+  this->_id = static_cast<QUICConnection 
*>(reinterpret_cast<QUICNetVConnection *>(new_vc))->connection_id();
 
   return;
 }
diff --git a/proxy/logging/LogAccess.cc b/proxy/logging/LogAccess.cc
index 22c964a..c0214ae 100644
--- a/proxy/logging/LogAccess.cc
+++ b/proxy/logging/LogAccess.cc
@@ -2529,7 +2529,7 @@ LogAccess::marshal_client_http_connection_id(char *buf)
   if (buf) {
     int64_t id = 0;
     if (m_http_sm) {
-      id = m_http_sm->client_connection_id();
+      id = m_http_sm->client_session_id();
     }
     marshal_int(buf, id);
   }
diff --git a/src/traffic_server/InkAPI.cc b/src/traffic_server/InkAPI.cc
index 3e07946..b5ccbbc 100644
--- a/src/traffic_server/InkAPI.cc
+++ b/src/traffic_server/InkAPI.cc
@@ -9734,7 +9734,7 @@ TSHttpSsnIdGet(TSHttpSsn ssnp)
 {
   sdk_assert(sdk_sanity_check_http_ssn(ssnp) == TS_SUCCESS);
   ProxySession *cs = reinterpret_cast<ProxySession *>(ssnp);
-  return cs->connection_id();
+  return cs->get_id();
 }
 
 // Return information about the protocols used by the client
diff --git a/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py 
b/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py
index 1b4be84..fda0a3a 100644
--- a/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py
+++ b/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py
@@ -64,7 +64,7 @@ ts.Streams.stderr += Testers.ContainsExpression(
 # Set up the json replay file expectations.
 replay_file_session_1 = os.path.join(replay_dir, "127", "0000000000000000")
 ts.Disk.File(replay_file_session_1, exists=True)
-replay_file_session_2 = os.path.join(replay_dir, "127", "0000000000000001")
+replay_file_session_2 = os.path.join(replay_dir, "127", "0000000000000002")
 ts.Disk.File(replay_file_session_2, exists=True)
 
 # Execute the first transaction.

Reply via email to