feat(collector): add producer watchdog diagnostics - #830
Conversation
|
Warning Review limit reached
Next review available in: 43 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Binance LOB archiver now tracks per-producer receive and enqueue timestamps, processing progress, and queue health. Watchdog stall logs include these diagnostics. Session, rotation-barrier, and WebSocket paths update the metrics, with focused tests for stale and silent producers and saturated queues. ChangesWatchdog diagnostics
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rust_hft/tools/collector/src/bin/binance-lob-archiver.rs`:
- Around line 2764-2766: Move QueueHealth::from_sender recording in the send
flow so it occurs only after successful SendOutcome::Sent, ensuring the watchdog
observes the post-enqueue queue state. Apply this in
rust_hft/tools/collector/src/bin/binance-lob-archiver.rs at lines 2764-2766,
2654-2656 for each buffered proof event, and 2674-2681 after the pre-proof
event; retain existing shutdown and other send-outcome handling.
- Around line 1029-1030: Update the reconnect/session setup around
ProducerDiagnostics::new, run_session, and reset_session_diagnostics to rebuild
producer metadata from each session’s current stream_shards before spawning
producers, rather than only clearing timestamps. Ensure watchdog diagnostics
reflect the current producer IDs, URLs, and stream groups after runtime symbol
exclusions, while preserving each active WebSocket shard’s endpoint and
subscribed streams. Add a reconnect test that changes the active symbol set and
verifies the rebuilt metadata.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 42a9ac0d-9b20-46ac-8c1f-5282a87a1b0c
📒 Files selected for processing (1)
rust_hft/tools/collector/src/bin/binance-lob-archiver.rs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf3324c352
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
bf3324c to
5156a3c
Compare
Issue relationship
Closes #829
Summary
Verification
cargo test -p hft-collector --bin binance-lob-archiver --locked— 91 passed (local macOS run used a temporaryRUSAGE_SELFshim only; restored before commit)cargo check -p hft-collector --bin binance-lob-archiver --tests --target x86_64-unknown-linux-gnu --lockedcargo clippy -p hft-collector --bin binance-lob-archiver --tests --target x86_64-unknown-linux-gnu --locked -- -D warningsgit diff --checkNo watchdog threshold, reconnect policy, event/schema, dependency, runtime, or deployment behavior changes.