You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/05/18 02:27:01 UTC

[GitHub] [trafficserver] maskit commented on a change in pull request #7849: Make HttpSM server reference a Transaction instead of a Session

maskit commented on a change in pull request #7849:
URL: https://github.com/apache/trafficserver/pull/7849#discussion_r633986178



##########
File path: proxy/http/HttpSessionManager.cc
##########
@@ -484,3 +489,50 @@ HttpSessionManager::release_session(PoolableSession *to_release)
 
   return released_p ? HSM_DONE : HSM_RETRY;
 }
+
+void
+ServerSessionPool::removeSession(PoolableSession *to_remove)
+{
+  EThread *ethread = this_ethread();
+  SCOPED_MUTEX_LOCK(lock, mutex, ethread);
+  char peer_ip[INET6_ADDRPORTSTRLEN];
+  if (is_debug_tag_set("http_ss")) {
+    ats_ip_nptop(to_remove->get_remote_addr(), peer_ip, sizeof(peer_ip));
+    Debug("http_ss", "Remove session %p %s m_fqdn_pool size=%" PRId64 " m_ip_pool_size=%" PRId64, to_remove, peer_ip,

Review comment:
       Please use `%zu` for `size_t`. https://github.com/apache/trafficserver/pull/7830
   
   ```
   HttpSessionManager.cc:502:11: error: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
             m_fqdn_pool.count(), m_ip_pool.count());
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ../../include/tscore/Diags.h:158:35: note: expanded from macro 'Debug'
         log_message.debug(tag, loc, __VA_ARGS__);               \
                                     ^~~~~~~~~~~
   HttpSessionManager.cc:502:32: error: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
             m_fqdn_pool.count(), m_ip_pool.count());
             ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   ../../include/tscore/Diags.h:158:35: note: expanded from macro 'Debug'
         log_message.debug(tag, loc, __VA_ARGS__);               \
                                     ^~~~~~~~~~~
   HttpSessionManager.cc:509:113: error: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
       Debug("http_ss", "After Remove session %p m_fqdn_pool size=%" PRId64 " m_ip_pool_size=%" PRId64, to_remove, m_fqdn_pool.count(),
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
   ../../include/tscore/Diags.h:158:35: note: expanded from macro 'Debug'
         log_message.debug(tag, loc, __VA_ARGS__);               \
                                     ^~~~~~~~~~~
   HttpSessionManager.cc:510:11: error: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
             m_ip_pool.count());
             ^~~~~~~~~~~~~~~~~~
   ../../include/tscore/Diags.h:158:35: note: expanded from macro 'Debug'
         log_message.debug(tag, loc, __VA_ARGS__);               \
                                     ^~~~~~~~~~~
   4 errors generated.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org