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

Wait forever for fatal errors #155

Merged
merged 4 commits into from
Jan 19, 2025
Merged

Wait forever for fatal errors #155

merged 4 commits into from
Jan 19, 2025

Conversation

rokatyy
Copy link
Contributor

@rokatyy rokatyy commented Jan 13, 2025

Comment on lines 195 to 196
}
func errorMatches(err error, substrings []string) bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

newline

Comment on lines 129 to 130
&c.getShardLocationBackoff, func(attempt int) (bool, error, int) {
c.currentShardLocation, err = c.getCurrentShardLocation(c.shardID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
&c.getShardLocationBackoff, func(attempt int) (bool, error, int) {
c.currentShardLocation, err = c.getCurrentShardLocation(c.shardID)
&c.getShardLocationBackoff,
func(attempt int) (bool, error, int) {
c.currentShardLocation, err = c.getCurrentShardLocation(c.shardID)

pkg/common/helper.go Show resolved Hide resolved

func EngineErrorIsFatal(err error) bool {
var fatalEngineErrorsPartialMatch = []string{
"Failed to fetch record batches",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not the error from v3io, this is a log the this client prints later.
As the ticket says, you want to retry on:

lookup v3io-webapi: i/o timeout

// if the error is fatal and requires external resolution,
// we don't want to fail; instead, we will inform the user via a log
if common.EngineErrorIsFatal(err) {
// although RetryFunc already logs the error, it logs it as a warning
Copy link
Collaborator

Choose a reason for hiding this comment

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

It actually doesn't log the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

loggerInstance.WarnWithCtx(ctx,
"Context error detected during retries",
"ctxErr", ctx.Err(),
"previousErr", err,
"function", getFunctionName(fn),
"attempt", attempt)
// return the error if one was provided
if err != nil {
return err
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

This warning is for a ctx.Error, like if an external error happened.
In your case you check the error returned from getCurrentShardLocation, which isn't handled by the retry func.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TomerShor right 🤦

i'll remove comment

@TomerShor TomerShor merged commit 9adc70d into v3io:development Jan 19, 2025
1 check passed
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