Remove noisy INFO log in ResetMaxSize and fix hpack UT instability - #3488
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes a high-volume LOG(INFO) inside HPACK dynamic table size update handling to prevent unit test instability/timeouts (notably under ASAN) caused by excessive log output in tight loops.
Changes:
- Remove the per-call
LOG(INFO)fromIndexTable::ResetMaxSize()in HPACK decoding. - Reduce log spam during long sequences of Dynamic Table Size Update entries, improving CI reliability/performance for the related HPACK unit test.
Suppressed comments (1)
src/brpc/details/hpack.cpp:185
- The commented-out LOG/return in this branch is misleading (it calls the new_max_size increase “Invalid” even though the code accepts it) and adds noise in a hot-path method. Please remove the dead commented-out lines to avoid confusion for future readers.
//LOG(ERROR) << "Invalid new_max_size=" << new_max_size;
//return -1;
_max_size = new_max_size;
return;
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Related to #3473
Problem Summary:
The
HPackTest.many_dynamic_table_size_updatestest (introduced inPR #3343) was unstable in clang-unittest-asan CI, frequently hanging.
Root cause:
200000 LOG(INFO) lines in a single test —
ResetMaxSize()printeda
LOG(INFO)on every call. The test feeds 200000 consecutive DynamicTable Size Update entries, each triggering an INFO log, flooding the
output with 200000+ lines. Under ASAN this log storm was slow enough to
timeout CI jobs.
What is changed and the side effects?
Changed:
LOG(INFO)fromIndexTable::ResetMaxSize(). This was adebug-only log that printed on every HTTP/2 table size update — it had
no place in production code and was the direct cause of the log storm.
Side effects:
LOG(INFO)fromResetMaxSize()is aminor improvement for all HTTP/2 decoding paths that handle table size
updates.
How to test?
HPackTest.many_dynamic_table_size_updatesnow runs underASAN in ~1ms with 12 lines of log output (previously ~527ms with
200012 lines).
Check List: