Commit 3613bb3
S3 batch delete: log per-object failures and add a failure counter (#3257)
S3 DeleteObjects always returns HTTP 200 with per-object errors in the
XML response body. Today, when a sub-op fails inside a batch, the
failure is captured into the response payload but is never logged or
counted on the frontend, so partial failures are invisible to operators
unless every response body is parsed offline.
Two changes:
- Log every per-object failure at WARN with key, error code, the
parent request URI, and the exception (stack trace included via
SLF4J's trailing-throwable convention). Operators can now grep
'S3 batch delete sub-op failed' in ambry-frontend.log to find
failed deletes inside otherwise-200 batches.
- Add s3BatchDeleteSubOpFailureCount Counter to FrontendMetrics.
Increments per failed sub-op. Lets dashboards/alerts track
partial-failure rate without log scraping.
No protocol or response-body change. The handler's HTTP behavior is
unchanged: still returns 200 with the same DeleteResult XML containing
deleted/error lists. Existing S3BatchDeleteHandlerTest (6 tests) passes.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7273f9f commit 3613bb3
2 files changed
Lines changed: 14 additions & 5 deletions
File tree
- ambry-frontend/src/main/java/com/github/ambry/frontend
- s3
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
178 | 183 | | |
179 | 184 | | |
180 | 185 | | |
| |||
533 | 538 | | |
534 | 539 | | |
535 | 540 | | |
| 541 | + | |
| 542 | + | |
536 | 543 | | |
537 | 544 | | |
538 | 545 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | 153 | | |
155 | 154 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | 155 | | |
160 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| |||
0 commit comments