Skip to content

[ISSUE #10425] Revert split registration dataVersion change#10426

Merged
yx9o merged 1 commit into
developfrom
revert-9521-split-registration-dataversion
Jun 5, 2026
Merged

[ISSUE #10425] Revert split registration dataVersion change#10426
yx9o merged 1 commit into
developfrom
revert-9521-split-registration-dataversion

Conversation

@RongtongJin

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Brief Description

This reverts #9521 and restores the topic config DataVersion advancement when enableSplitRegistration is enabled.

With split broker registration, a broker sends topic configs to the name server in multiple registration requests. The name server records the broker DataVersion after each request and uses it to decide whether existing topic route data should be updated. If all split requests carry the same DataVersion, later batches can be treated as unchanged for topics that already exist under the broker.

Restoring the per-wrapper DataVersion advancement keeps each split registration batch visible as a distinct update. This PR also adds a focused regression test for TopicConfigManager#buildSerializeWrapper.

How Did You Test This Change?

  • /usr/local/bin/mvn -pl broker -am -Dtest=TopicConfigManagerTest -DfailIfNoTests=false -DskipITs -DskipCheckStyle test

@RongtongJin RongtongJin marked this pull request as ready for review June 3, 2026 13:17
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.95%. Comparing base (2a9560c) to head (0e56f56).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10426      +/-   ##
=============================================
- Coverage      48.05%   47.95%   -0.11%     
+ Complexity     13303    13277      -26     
=============================================
  Files           1377     1377              
  Lines         100611   100613       +2     
  Branches       12991    12992       +1     
=============================================
- Hits           48347    48246     -101     
- Misses         46348    46427      +79     
- Partials        5916     5940      +24     

☔ View full report in Codecov by Sentry.
📢 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.

@oss-sentinel-ai oss-sentinel-ai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review by github-manager-bot

Summary

Restores the DataVersion.nextVersion() advancement in TopicConfigManager#buildSerializeWrapper when enableSplitRegistration is enabled, fixing the issue where later split registration batches skip topic config updates on the NameServer.

Findings

  • [Correctness] ✅ The fix is minimal and precisely scoped. The nextVersion() call is correctly guarded by isEnableSplitRegistration(), so non-split registration is unaffected.

  • [Root cause verified] ✅ Traced through RouteInfoManager#registerBrokerisBrokerTopicConfigChanged (compares DataVersion from each split batch against stored value from brokerLiveTable). Without per-batch DataVersion advancement, the NameServer stores the version after the first batch and subsequent batches appear unchanged, causing isTopicConfigChanged to return false for existing topics.

  • [Tests]testBuildSerializeWrapperUpdatesDataVersionWhenSplitRegistrationEnabled directly verifies the counter increment. Good regression test coverage for the specific fix.

  • [CI] ✅ All 10 checks pass (CodeQL, bazel-compile, maven-compile × 4 platforms, coverage, license, misspell).

  • [Compatibility] ✅ No API or protocol changes. No backward compatibility concerns.

Suggestions

Consider adding a second assertion in the test to also verify the DataVersion stored in the returned wrapper matches the counter, confirming the wrapper carries the incremented version — this would more closely mirror the actual runtime check in RouteInfoManager:

// Already present, good:
Assert.assertEquals(counterAfter, wrapper.getDataVersion().getCounter().get());

Actually this assertion already exists — well done. LGTM.


Automated review by github-manager-bot

@yx9o yx9o merged commit 7e0cec3 into develop Jun 5, 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.

[Bug] Split registration can skip topic updates after #9521

5 participants