Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly count redis active connection #312

Merged
merged 3 commits into from
Nov 26, 2021
Merged

Conversation

debbyku
Copy link
Contributor

@debbyku debbyku commented Nov 19, 2021

Missing the error checking when incrementing the redis active connection count.

As shown in following codes, the "PoolConnCreated" can be error. I hit such bug when I use password to connect to redis cluster but the whole cluster stops.

(https://github.com/mediocregopher/radix/blob/b6f646dba0b862f3c335167c92d3256a2989406d/trace/pool.go#L61)

type PoolConnCreated struct {
	PoolCommon

	// The reason the connection was created.
	Reason PoolConnCreatedReason

	// How long it took to create the connection.
	ConnectTime time.Duration

	// If connection creation failed, this is the error it failed with.
	Err error
} 

Copy link
Member

@ysawa0 ysawa0 left a comment

Choose a reason for hiding this comment

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

lgtm!

@ysawa0 ysawa0 merged commit 0a85f51 into envoyproxy:main Nov 26, 2021
@debbyku
Copy link
Contributor Author

debbyku commented Nov 26, 2021 via email

timcovar pushed a commit to goatapp/ratelimit that referenced this pull request Jan 16, 2024
* health check failed if no active redis connection

Signed-off-by: debbyku <[email protected]>

* solve redis connection active count error

Signed-off-by: debbyku <[email protected]>
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