Skip to content

Commit c9fa217

Browse files
Ruler: Prevent counting 2xx responses as failed writes (#6785)
* Prevent counting 2xx responses as failed writes Signed-off-by: Anand Rajagopal <[email protected]> * Adding changelog Signed-off-by: Anand Rajagopal <[email protected]> --------- Signed-off-by: Anand Rajagopal <[email protected]> Signed-off-by: Ben Ye <[email protected]> Co-authored-by: Ben Ye <[email protected]>
1 parent cca0cc7 commit c9fa217

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* [BUGFIX] Add `__markers__` tenant ID validation. #6761
5252
* [BUGFIX] Ring: Fix nil pointer exception when token is shared. #6768
5353
* [BUGFIX] Fix race condition in active user. #6773
54+
* [BUGFIX] Ruler: Prevent counting 2xx and 4XX responses as failed writes. #6785
5455
* [BUGFIX] Ingester: Allow shipper to skip corrupted blocks. #6786
5556

5657
## 1.19.0 2025-02-27

pkg/ruler/compat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (a *PusherAppender) Commit() error {
9696
_, err := a.pusher.Push(user.InjectOrgID(a.ctx, a.userID), req)
9797
if err != nil {
9898
// Don't report errors that ended with 4xx HTTP status code (series limits, duplicate samples, out of order, etc.)
99-
if resp, ok := httpgrpc.HTTPResponseFromError(err); !ok || resp.Code/100 != 4 {
99+
if resp, ok := httpgrpc.HTTPResponseFromError(err); !ok || resp.Code/100 == 5 {
100100
a.failedWrites.Inc()
101101
}
102102
}

0 commit comments

Comments
 (0)