Skip to content

Preserve metadata page size when copying ClientConfig - #11615

Merged
ShannonDing merged 1 commit into
apache:developfrom
MrKen20:codex/client-config-metadata-page-size
Nov 25, 2026
Merged

ShannonDing merged 1 commit into
apache:developfrom
MrKen20:codex/client-config-metadata-page-size

Conversation

@MrKen20

@MrKen20 MrKen20 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Found during source review. Related context: #11041 uses a custom metadata page size.

Brief Description

Copy maxPageSizeInGetMetadata in cloneClientConfig and resetClientConfig. The clone otherwise falls back to 2000, and reset keeps the destination's previous value. Copying the field preserves the configured page size for Topic and subscription group metadata requests.

How Did You Test This Change?

  • Added regression tests for cloning and resetting with the source page size set to 100. Before the fix, the clone used 2000 and the reset destination kept 300. Both use 100 after the fix.
  • Ran mvn -B -pl client -am -Dtest=ClientConfigTest,MQClientAPIImplTest,MQClientManagerTest -Dsurefire.failIfNoSpecifiedTests=false -Djacoco.skip=true test on JDK 21. All 147 tests passed. Checkstyle and SpotBugs passed.

Copy maxPageSizeInGetMetadata when cloning or resetting ClientConfig so metadata requests keep the configured page size. Cover both operations with non-default values.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.53%. Comparing base (74c2a8e) to head (e34803a).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #11615      +/-   ##
=============================================
+ Coverage      50.47%   50.53%   +0.06%     
- Complexity     14711    14730      +19     
=============================================
  Files           1391     1391              
  Lines         103541   103551      +10     
  Branches       13575    13575              
=============================================
+ Hits           52261    52334      +73     
+ Misses         45042    44968      -74     
- Partials        6238     6249      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MrKen20 MrKen20 changed the title fix(client): preserve metadata page size when copying configuration Preserve metadata page size when copying ClientConfig Nov 25, 2026
@ShannonDing
ShannonDing merged commit 1f083eb into apache:develop Nov 25, 2026
10 checks passed
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