Conversation
d499157 to
260a498
Compare
91d75d3 to
b753a3f
Compare
b753a3f to
d9a1a5d
Compare
WalkthroughAdds conditional debug/info logging across BLMPop expiration checks, BLMPop constructor, RPUSH parsing for specific test keys, and list append path for a specific element. No control-flow, API, data structure, or behavior changes beyond emitting logs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
include/redis_command.h (1)
2876-2883: Compute predicate once; ensure logging macro is available in TUTiny nit: avoid re-evaluating
clock_ts > ts_expired_; compute once and return the bool. Also, since this is in a header, verify all TUs including this header haveDLOGdefined (or include butil/logging here, or move this method to a .cpp) to prevent build fragility.- auto clock_ts = txservice::LocalCcShards::ClockTs(); - if (clock_ts > ts_expired_) - { - DLOG(INFO) << "BLMPopCommand, expired, ClockTs: " << clock_ts - << ", ts_expired: " << ts_expired_; - } - return clock_ts > ts_expired_; + const auto clock_ts = txservice::LocalCcShards::ClockTs(); + const bool expired = clock_ts > ts_expired_; + if (expired) { + DLOG(INFO) << "BLMPopCommand expired: now=" << clock_ts + << " deadline=" << ts_expired_; + } + return expired;If
DLOGisn’t guaranteed in all includers, either add#include "butil/logging.h"here or move this method out-of-line to a .cpp.src/redis_list_object.cpp (1)
644-649: Gate the test-specific “foo” log behind a flag or remove before shipHard-coding a sentinel value in core write path is brittle. Keep it if you need it for #109, but please guard with a build/runtime flag (e.g.,
#ifdef ELOQKV_DEBUG_BLPOP) or plan to remove post‑debug to avoid surprising noise later.src/redis_command.cpp (1)
11522-11525: Gate test-only key/value logging to avoid leaking user data in prod.This emits keys and values for specific test inputs. Guard behind a build flag to keep production logs clean.
Apply this minimal guard:
- if ((args[1] == "blist1{t}" || args[1] == "blist2{t}") && args[2] == "foo") - { - DLOG(INFO) << "rpush : " << args[1] << " " << args[2]; - } + #ifdef ELOQ_TEST_LOGS + if ((args[1] == "blist1{t}" || args[1] == "blist2{t}") && args[2] == "foo") { + DLOG(INFO) << "rpush : " << args[1] << " " << args[2]; + } + #endifAlso, please confirm whether butil’s DLOG is compiled out in release builds in your setup.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
include/redis_command.h(1 hunks)src/redis_command.cpp(2 hunks)src/redis_list_object.cpp(1 hunks)
🔇 Additional comments (1)
src/redis_command.cpp (1)
4980-4981: BLMPop ctor debug log is fine.Non-invasive, helpful for tracing timeouts. Consider adding VLOG level if available, but OK as-is.
d9a1a5d to
0f06fa5
Compare
For #109 .
Summary by CodeRabbit