-
Notifications
You must be signed in to change notification settings - Fork 21
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
Log all different failed and recovered reconnects to backends #369
Conversation
E.g. the first "connection refused" and the first "hostname mismatch". refs #351
|
|
pkg/config/redis.go
Outdated
}, | ||
OnSuccess: func(elapsed time.Duration, attempt uint64, _ error) { | ||
if attempt > 0 { | ||
logger.Infow("Re-connected to Redis", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can write Reconnected
instead of Re-connected
.
pkg/driver/driver.go
Outdated
}, | ||
OnSuccess: func(elapsed time.Duration, attempt uint64, _ error) { | ||
if attempt > 0 { | ||
c.driver.Logger.Infow("Re-connected to database", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can write Reconnected
instead of Re-connected
.
func WithBackoff( | ||
ctx context.Context, retryableFunc RetryableFunc, retryable IsRetryable, b backoff.Backoff, timeout time.Duration, | ||
ctx context.Context, retryableFunc RetryableFunc, retryable IsRetryable, b backoff.Backoff, settings Settings, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not use a pointer for settings
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go would allocate the &Settings{}
on the stack, too.
... to give the admin the all-clear. refs #351
2533ded
to
b4bfee9
Compare
E.g. the first "connection refused", the first "hostname mismatch" and the all-clear.
fixes #351