Skip to content

[ISSUE #11519] Fix early return in updateAndCreateTopicList when batch contains unchanged topics - #11520

Open
apkipa wants to merge 1 commit into
apache:developfrom
apkipa:fix/update-topic-list-early-return
Open

apkipa wants to merge 1 commit into
apache:developfrom
apkipa:fix/update-topic-list-early-return

Conversation

@apkipa

@apkipa apkipa commented Nov 15, 2026

Copy link
Copy Markdown

Which Issue(s) This PR Fixes

Brief Description

In AdminBrokerProcessor#updateAndCreateTopicList, hitting an unchanged topic inside the validation loop previously executed return response;, exiting the entire batch request early and skipping all subsequent topics in topicConfigList.

This PR skips unchanged topics with continue and only updates/registers the changed subset (needUpdateTopicConfigList) when non-empty.

How Did You Test This Change?

  • Added unit test AdminBrokerProcessorTest#testUpdateAndCreateTopicListWithUnchangedTopics covering all-unchanged batches and mixed batches ([unchanged, updated, new]) under both incremental and enableSingleTopicRegister modes.
  • Ran mvn -pl broker -am test -Dtest=AdminBrokerProcessorTest -DfailIfNoTests=false.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.79%. Comparing base (164322b) to head (86b867f).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #11520   +/-   ##
==========================================
  Coverage      49.79%   49.79%           
- Complexity     14407    14411    +4     
==========================================
  Files           1391     1391           
  Lines         103381   103383    +2     
  Branches       13529    13530    +1     
==========================================
+ Hits           51477    51480    +3     
- Misses         45686    45689    +3     
+ Partials        6218     6214    -4     

☔ 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.

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.

[Bug] AdminBrokerProcessor#updateAndCreateTopicList returns early on the first unchanged topic and skips remaining topics

2 participants