-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: Harvest should reduce batch size and retry when ONTAP times out #2770
Conversation
cmd/collectors/zapiperf/zapiperf.go
Outdated
z.Logger.Error().Err(err). | ||
Int("oldBatchSize", z.batchSize). | ||
Int("newBatchSize", z.batchSize-100). | ||
Msg("Changed batch_size") | ||
z.batchSize -= 100 | ||
return nil, nil | ||
} else if strings.Contains(errMsg, "Timeout: Operation") && z.batchSize > 100 { |
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.
Perhaps it would be better to compare both errMsg and Timeout: Operation
in lowercase?
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.
Agreed.
cmd/collectors/zapiperf/zapiperf.go
Outdated
z.Logger.Error().Err(err). | ||
Int("oldBatchSize", z.batchSize). | ||
Int("newBatchSize", z.batchSize-100). | ||
Msg("Changed batch_size") | ||
z.batchSize -= 100 | ||
return nil, nil | ||
} else if strings.Contains(errMsg, "Timeout: Operation") && z.batchSize > 100 { |
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.
Agreed.
No description provided.