-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Internal refactor: LastError as a public struct #12321
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
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.
lgtm
go/vt/vterrors/last_error.go
Outdated
@@ -87,7 +86,7 @@ func (le *lastError) shouldRetry() bool { | |||
// within the max time range | |||
return true | |||
} | |||
log.Errorf("VReplication encountered the same error continuously since %s, we will assume this is a non-recoverable error and will not retry anymore; the workflow will need to be manually restarted once error '%s' has been addressed", | |||
le.firstSeen.UTC(), le.err) | |||
log.Errorf("%s: the same error was encountered continuously since %s, it is now assumed to be unrecoverable; any affected workflows will need to be manually restarted once error '%s' has been addressed", |
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.
Should we say operations instead of workflows?
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.
fixed.
Signed-off-by: Shlomi Noach <[email protected]>
ignoring |
I was unable to backport this Pull Request to the following branches: |
Will backport this maually |
Description
lastError
is a mechanism introduced intoVReplication
in #10429 ; the idea is that we can have a retry-able operation that waits for some error to clean up, or times out if the error persists.Up till now this was a local class in
vreplication
package. I have a use case outside VReplication (well, related, it's Online DDL). Anyway, the mechanism is really quite generic and useful, and so I'm externalizing the structure and moving it togo/vt/vterrors
.There's no real code changes here other than using the
name
field ofLastError
in place of hard coded"Vreplication"
text.This refactor includes the recent changes made in #12114
Related Issue(s)
Checklist
Deployment Notes