Skip to content

Wait forever for fatal errors#155

Merged
TomerShor merged 4 commits intov3io:developmentfrom
rokatyy:nuc-340
Jan 19, 2025
Merged

Wait forever for fatal errors#155
TomerShor merged 4 commits intov3io:developmentfrom
rokatyy:nuc-340

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)


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