fix(cubestore): do not log rate limit errors as errors in HTTP module#11293
Conversation
Rate limit errors (cache & queue rate limit exceeded) are expected under load and are already returned to the client, so log them at debug level instead of flooding the error log. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwdzVLM36sqhCeT2Mhimro
|
Claude finished @paveltiunov's task in 1m 22s —— View job Code ReviewSmall, low-risk change that stops rate-limit errors from flooding the Review details — 2 low-severity notes
Observations1. Code duplication in both branches (low). The let level = if is_rate_limit_error(&e) { log::Level::Debug } else { log::Level::Error };
log::log!(
level,
"Error processing HTTP command (connection_id={}): {}\nThe command: {}",
connection_id.as_deref().unwrap_or("(None)"),
e.display_with_backtrace(),
command_text,
);Not a blocker — the current form is straightforward — just a readability win. 2. Substring classifier is fragile (low, informational).
Non-issues
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwdzVLM36sqhCeT2Mhimro
|
Claude finished @paveltiunov's task in 1m 57s —— View job Code reviewVerdict: looks good in intent — the two log sites do get downgraded and the client response is unchanged. Two concerns worth addressing before merge, plus one nit. Details (1 medium, 1 low, 1 nit)1. Fragile substring match (medium) —
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11293 +/- ##
=======================================
Coverage 59.44% 59.44%
=======================================
Files 216 216
Lines 17474 17474
Branches 3539 3539
=======================================
Hits 10387 10387
Misses 6581 6581
Partials 506 506
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… match, dedupe log calls Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwdzVLM36sqhCeT2Mhimro
|
Claude finished @paveltiunov's task in 44s —— View job Code reviewVerdict: LGTM. Both prior review threads (case-sensitivity, log-call duplication) were addressed in 32b7a8f, and no new issues surfaced. Resolved the two stale threads. Details
Notes
|
Check List
Description of Changes Made (if issue reference is not provided)
"Cache & queue rate limit" errors were flooding the CubeStore error log via the
cubestore::httpmodule (~33kError processing HTTP commandentries per 15 minutes on affected deployments). These errors are expected under load and are already returned to the client, so this change downgrades them fromerror!towarn!at bothprocess_commanderror-handling sites inhttp/mod.rs. All other errors are still logged aterrorlevel, and the error responses sent to clients are unchanged.Verified with
cargo check -p cubestore.🤖 Generated with Claude Code
https://claude.ai/code/session_01BwdzVLM36sqhCeT2Mhimro