From 437d68e91e39fd22ca8bbc89ea9165b8153dcdf6 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 20 Oct 2026 02:51:45 +0000 Subject: [PATCH] Do not log connection pointer addresses in `ConnectionPool` The connection reuse and stale connection logs printed the raw heap address of the connection object, which ends up in the host application logs (e.g. `system.text_log` in ClickHouse) and discloses the memory layout. Co-Authored-By: Claude Opus 5.5 --- lib/ConnectionPool.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ConnectionPool.cc b/lib/ConnectionPool.cc index 35d815ab..c5bd63b6 100644 --- a/lib/ConnectionPool.cc +++ b/lib/ConnectionPool.cc @@ -116,13 +116,12 @@ Future ConnectionPool::getConnectionAsync(const if (!cnx->isClosed()) { // Found a valid or pending connection in the pool - LOG_DEBUG("Got connection from pool for " << key << " use_count: " // - << (cnx.use_count()) << " @ " << cnx.get()); + LOG_DEBUG("Got connection from pool for " << key << " use_count: " << (cnx.use_count())); return cnx->getConnectFuture(); } else { // The closed connection should have been removed from the pool in ClientConnection::close - LOG_WARN("Deleting stale connection from pool for " << key << " use_count: " << (cnx.use_count()) - << " @ " << cnx.get()); + LOG_WARN("Deleting stale connection from pool for " << key + << " use_count: " << (cnx.use_count())); pool_.erase(key); } }