[TENT] Add logs for troubleshooting#1475
Conversation
Summary of ChangesHello @alogfans, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly overhauls the logging infrastructure within the TENT module to improve system observability and streamline troubleshooting. The changes focus on reducing log noise by introducing a unified rate-limiting mechanism, enhancing error diagnostics with more contextual information, and ensuring critical failures are logged appropriately without overwhelming the system. The overall impact is a more informative and less noisy logging experience, making it easier to diagnose and resolve issues within the transfer engine. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This is a great pull request that significantly improves the logging and observability of the TENT module. I particularly like the new LogRateLimiter for controlling log volume and the much-improved diagnostics for RDMA work completion errors—that will be incredibly helpful for debugging. Replacing LOG(FATAL) with LOG(ERROR) across the board is also a solid improvement for robustness.
I've found a critical compilation error due to a typo and a high-severity issue with the LogRateLimiter's handling of time that could lead to incorrect behavior. Once these are addressed, this PR will be in excellent shape. Great work on enhancing the system's maintainability!
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…iter.h Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
staryxchen
left a comment
There was a problem hiding this comment.
Glog provides several built-in macros for rate limiting purpose, like LOG_EVERY_N, LOG_FIRST_N and LOG_IF_EVERY_N. Can we reuse these macros?
We expect to avoid mass output in a short time period, so we prefer to throttle by wall-clock time rather than repeats (what these macros do) |
Description
This PR improves the logging system for the TENT module to enhance observability and troubleshooting capabilities while reducing log noise.
1. Unified Log Rate Limiting Mechanism
LogRateLimiterutility class (tent/src/common/log_rate_limiter.h)LOG_RATE_LIMIT_1S,LOG_RATE_LIMIT_2S,LOG_RATE_LIMIT_5S,LOG_RATE_LIMIT_10S2. Proxy Manager (
tent/src/runtime/proxy_manager.cpp)3. RDMA Workers (
tent/src/transport/rdma/workers.cpp)getWcErrorDiagnostic()function providing actionable guidance for each error typeqp_num,target_id,length, and diagnostic hints"WC error: remote access error | Remote access error - peer denied access. Check remote memory permissions."LogRateLimiterLOG_EVERY_Nwith time-based rate limiting4. Control Plane (
tent/src/runtime/control_plane.cpp)SendData/RecvDatabuffer not found (data loss scenarios)PinStageBuffer/UnpinStageBufferfailures (resource exhaustion)Delegatefailure logs withtarget_idandopcode5. NVLink Transport (
tent/src/transport/nvlink/nvlink_transport.cpp)Type of Change
How Has This Been Tested?
TBD
Checklist
./scripts/code_format.shbefore submitting.