This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Fixing behavior where we bail on all batches if one fails#1019
Open
andresgalindo-stripe wants to merge 2 commits into
Open
Fixing behavior where we bail on all batches if one fails#1019andresgalindo-stripe wants to merge 2 commits into
andresgalindo-stripe wants to merge 2 commits into
Conversation
andrewa-stripe
left a comment
Contributor
There was a problem hiding this comment.
minor changes. Understand the change now and old comments were not relevant.
| } | ||
|
|
||
| var _ sinks.MetricSink = (*CortexMetricSink)(nil) | ||
| var DoIfNotDoneError = errors.New("context finished before completing metrics flush") |
Contributor
There was a problem hiding this comment.
New also records the stack trace at the point it was called
errors.New should not be cached for usages
If error checking is necessary, we should introduce an error type and use errors.Is
| s.logger.Error(err) | ||
| droppedMetrics += len(metrics) - flushedMetrics | ||
| // Any other type of error will happen inside of doIfNotDone | ||
| // so we only need ot handle context cancellations |
Contributor
There was a problem hiding this comment.
Suggested change
| // so we only need ot handle context cancellations | |
| // so we only need to handle context cancellations |
Contributor
|
#1022 does the ?same? |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
No longer erring out if one batch fails
Motivation
We want as many metrics to try and get written, errors may be related to things like writing duplicate time series which shouldn't stop the entire loop.
Test plan
Rollout/monitoring/revert plan