Skip to content

chore: add debug visibility on bad connection pool#1920

Draft
kavirajk wants to merge 1 commit into
mainfrom
kavirajk/pool-bad-connection-visibility-v2.47.0
Draft

chore: add debug visibility on bad connection pool#1920
kavirajk wants to merge 1 commit into
mainfrom
kavirajk/pool-bad-connection-visibility-v2.47.0

Conversation

@kavirajk

Copy link
Copy Markdown
Contributor

Summary

Currently, if for some reason, the connection from pool is bad and client end up dialing (establishing) new connection instead, the only visibility in debug log is either "connection acquired from pool" or "new connection is established".

But this lacks "why" the connection was bad that caused to create new connection.

This changes makes sure those reasons are part of debug log

This is built on top of v2.47.0 tag instead of from main. DO NOT MERGE THIS as is, this is to help some ClickHouse customer to experiment with to track some performance bugs

Related to #1915

Checklist

Delete items not relevant to your PR:

Currently, if for some reason, the connection from pool is bad and client end up dialing (establishing) new connection instead, the only visibility in debug log is either "connection acquired from pool" or "new connection is established".

But this lacks "why" the connection was bad that caused to create new connection.

This changes makes sure those reasons are part of debug log

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Comment thread conn.go
}

func (c *connect) isBad() bool {
func (c *connect) healthCheck() error {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change that adds more visibility on debug log on "why connection is not re-used from the pool"

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.

1 participant