Fix canceled distributor push requests as 499 instead of 500#5018
Fix canceled distributor push requests as 499 instead of 500#5018wgliang wants to merge 1 commit into
Conversation
08433eb to
9581811
Compare
|
All ready to merge. |
|
This change may cause users to lose data since Prometheus(agent) does not retry on 499. |
| * [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.
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.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]