-
Notifications
You must be signed in to change notification settings - Fork 820
Fix canceled distributor push requests as 499 instead of 500 #5018
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
Fix canceled distributor push requests as 499 instead of 500 #5018
Conversation
08433eb
to
9581811
Compare
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.
LGTM
All ready to merge. |
This change may cause users to lose data since Prometheus(agent) does not retry on 499. |
@@ -10,6 +10,7 @@ | |||
* [FEATURE] Ingester: Added `-blocks-storage.tsdb.head-chunks-write-queue-size` allowing to configure the size of the in-memory queue used before flushing chunks to the disk . #5000 | |||
* [FEATURE] Query Frontend: Log query params in query frontend even if error happens. #5005 | |||
* [BUGFIX] Updated `golang.org/x/net` dependency to fix CVE-2022-27664. #5008 | |||
* [BUGFIX] Fix canceled distributor push requests as 499 instead of 500. #5018 |
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.
I bet many users are going to understand this line as clients will receive 499. Can you make it obvious that this only affects internal metrics and logs?
@friedrichg IMHO, context could be canceled by the distributor level timeout( |
@damnever you are absolutely right. We should continue to return 500 if the remote-timeout is hit. This PR should ensure that. Good catch |
Signed-off-by: wangguoliang <iamwgliang@gmail.com>
9581811
to
254ccd2
Compare
The |
I will close this PR and re-issue a fix if there is a better solution. Thank you for your feedback. @damnever @friedrichg |
Signed-off-by: wangguoliang iamwgliang@gmail.com
What this PR does:
FIx canceled distributor push requests as 499 instead of 500.
FYI:https://www.webfx.com/web-development/glossary/http-status-codes/
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]