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

Allow ingester.Push() to proceed on soft errors only #6366

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

duricanikolic
Copy link
Contributor

What this PR does

Ingester's ingester.pushSamplesToAppender(), called by ingester.Push(), appends samples and exemplars to the appender. The former distinguishes between:

  • soft errors, which should allow ingester.Push() to continue its execution and to ingest all valid samples and exemplars, and to return the first encountered error only at the end, and
  • other errors, that should be returned immediately.

So far there was no precise way to determine which error is a soft error. This PR introduces softError, an interface that should be implemented by all the errors that shouldn't prevent ingester.Push() from going ahead. Only these errors will be considered as soft errors by pushSamplesToAppender().

Which issue(s) this PR fixes or relates to

Related to #6008

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@duricanikolic duricanikolic requested a review from a team as a code owner October 13, 2023 10:14
@duricanikolic duricanikolic self-assigned this Oct 13, 2023
Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com>
Copy link
Member

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

Thanks. I'm not sure about terminology, but we can change that in the future if we have a better idea.

@duricanikolic
Copy link
Contributor Author

Thanks. I'm not sure about terminology, but we can change that in the future if we have a better idea.

I used that name (softError) because these errors were already called like that in the present codebase. We will change it later if we find a better idea.

@duricanikolic duricanikolic merged commit d973fe8 into main Oct 13, 2023
28 checks passed
@duricanikolic duricanikolic deleted the yuri/update-first-soft-error branch October 13, 2023 11:42
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