Log all different failed and recovered reconnects to backends - #369
Merged
Merged
Conversation
E.g. the first "connection refused" and the first "hostname mismatch". refs #351
Member
Author
|
Member
Author
|
lippserd
requested changes
Sep 23, 2021
| }, | ||
| OnSuccess: func(elapsed time.Duration, attempt uint64, _ error) { | ||
| if attempt > 0 { | ||
| logger.Infow("Re-connected to Redis", |
Member
There was a problem hiding this comment.
I think we can write Reconnected instead of Re-connected.
| }, | ||
| OnSuccess: func(elapsed time.Duration, attempt uint64, _ error) { | ||
| if attempt > 0 { | ||
| c.driver.Logger.Infow("Re-connected to database", |
Member
There was a problem hiding this comment.
I think we can write Reconnected instead of Re-connected.
| // Once the specified timeout (if >0) elapses, WithBackoff gives up. | ||
| 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, |
Member
There was a problem hiding this comment.
Any reason to not use a pointer for settings?
Member
Author
There was a problem hiding this comment.
Go would allocate the &Settings{} on the stack, too.
... to give the admin the all-clear. refs #351
Al2Klimov
force-pushed
the
feature/log-reconnects-351
branch
from
September 23, 2021 14:07
2533ded to
b4bfee9
Compare
lippserd
approved these changes
Sep 23, 2021
julianbrost
approved these changes
Sep 24, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
E.g. the first "connection refused", the first "hostname mismatch" and the all-clear.
fixes #351