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

Distributor: replace ring.DoBatch with ring.DoBatchWithClientError #6636

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

duricanikolic
Copy link
Contributor

@duricanikolic duricanikolic commented Nov 13, 2023

What this PR does

This PR updates vendored dskit to revision 0ae8e2e7 and replaces the usage of ring.DoBatch() in distributor.push() with ring.DoBatchWithClientError(). One of the parameters of the latter is a classification function that distinguishes between client and server errors. In the case of distributor, the classification is done by the newly introduced distributor.isClientError() function that treats the following errors returned by ingester.Push() as client errors:

  • errors of type ingesterPushError with errorCause == mimirpb.BAD_DATA, and
  • errors created by httpgrpc.Errorf(), with status code 4xx (this is needed for backwards compatibility, and will be removed in mimir 2.12.0.

Which issue(s) this PR fixes or relates to

Part of #6008

Checklist

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

Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com>
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

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

LGTM

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.

@duricanikolic duricanikolic merged commit 8c6032f into main Nov 13, 2023
28 checks passed
@duricanikolic duricanikolic deleted the yuri/handling-errors-new branch November 13, 2023 12:35
grafanabot pushed a commit that referenced this pull request Nov 13, 2023
…6636)

Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com>
(cherry picked from commit 8c6032f)
@grafanabot
Copy link
Contributor

The backport to r264 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-6636-to-r264 origin/r264
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 8c6032f92e0bea7861a316c7fa20df6657b8edef
# Push it to GitHub
git push --set-upstream origin backport-6636-to-r264
git switch main
# Remove the local backport branch
git branch -D backport-6636-to-r264

Then, create a pull request where the base branch is r264 and the compare/head branch is backport-6636-to-r264.

duricanikolic added a commit that referenced this pull request Nov 14, 2023
…6636) (#6648)

Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com>
(cherry picked from commit 8c6032f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants