G
YouTube TikTok Games
Skip to content

[improve][client] Do not log the addresses of connection objects in ConnectionPool - #628

Open
groeneai wants to merge 1 commit into
apache:mainfrom
groeneai:fix-connection-pool-pointer-logs
Open

groeneai wants to merge 1 commit into
apache:mainfrom
groeneai:fix-connection-pool-pointer-logs

Conversation

@groeneai

Copy link
Copy Markdown

Motivation

The "Got connection from pool" and "Deleting stale connection from pool" logs of ConnectionPool::getConnectionAsync print cnx.get(), the heap address of the connection object. It adds nothing to the pool key that is already logged, and it puts the memory layout of the process into the application logs.

Modifications

Remove the pointer from both log lines.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)
    Log message change only.

This fix comes from the fork of this repository that ClickHouse uses for its Pulsar table engine (ClickHouse/ClickHouse#64184).

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants