Skip to content

Remove noisy INFO log in ResetMaxSize and fix hpack UT instability - #3488

Merged
chenBright merged 1 commit into
apache:masterfrom
wwbmmm:fix-unstable-hpack-ut
Aug 25, 2026
Merged

Remove noisy INFO log in ResetMaxSize and fix hpack UT instability#3488
chenBright merged 1 commit into
apache:masterfrom
wwbmmm:fix-unstable-hpack-ut

Conversation

@wwbmmm

@wwbmmm wwbmmm commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Related to #3473

Problem Summary:

The HPackTest.many_dynamic_table_size_updates test (introduced in
PR #3343) was unstable in clang-unittest-asan CI, frequently hanging.

Root cause:

200000 LOG(INFO) lines in a single testResetMaxSize() printed
a LOG(INFO) on every call. The test feeds 200000 consecutive Dynamic
Table 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:

  • Remove the LOG(INFO) from IndexTable::ResetMaxSize(). This was a
    debug-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:

  • Performance effects: Removing the LOG(INFO) from ResetMaxSize() is a
    minor improvement for all HTTP/2 decoding paths that handle table size
    updates.
  • Breaking backward compatibility: none.

How to test?

  • The test case HPackTest.many_dynamic_table_size_updates now runs under
    ASAN in ~1ms with 12 lines of log output (previously ~527ms with
    200012 lines).

Check List:

  • Please make sure your changes are compilable.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) from IndexTable::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.

@chenBright chenBright left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chenBright
chenBright merged commit 099cfc1 into apache:master Aug 25, 2026
15 checks passed
@wwbmmm
wwbmmm deleted the fix-unstable-hpack-ut branch August 25, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants