Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #7326] Split the request to register to the nameserver #7325

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

Ziy1-Tan
Copy link
Contributor

@Ziy1-Tan Ziy1-Tan commented Sep 7, 2023

Which Issue(s) This PR Fixes

Fixes #7326

Brief Description

How Did You Test This Change?

@Ziy1-Tan Ziy1-Tan marked this pull request as draft September 7, 2023 08:03
@Ziy1-Tan Ziy1-Tan changed the title Split the request to register to the nameserver [ISSUE #7326]Split the request to register to the nameserver Sep 7, 2023
@Ziy1-Tan Ziy1-Tan changed the title [ISSUE #7326]Split the request to register to the nameserver [ISSUE #7326] Split the request to register to the nameserver Sep 7, 2023
@Ziy1-Tan Ziy1-Tan marked this pull request as ready for review September 7, 2023 10:38
@Ziy1-Tan Ziy1-Tan force-pushed the develop branch 2 times, most recently from 8b3ead0 to 289b16b Compare September 7, 2023 12:30
@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2023

Codecov Report

Merging #7325 (06c1f8b) into develop (e11e294) will decrease coverage by 0.05%.
Report is 2 commits behind head on develop.
The diff coverage is 45.71%.

@@              Coverage Diff              @@
##             develop    #7325      +/-   ##
=============================================
- Coverage      42.69%   42.64%   -0.05%     
+ Complexity      9474     9466       -8     
=============================================
  Files           1152     1152              
  Lines          82721    82746      +25     
  Branches       10781    10783       +2     
=============================================
- Hits           35315    35288      -27     
- Misses         42997    43042      +45     
- Partials        4409     4416       +7     
Files Changed Coverage Δ
.../java/org/apache/rocketmq/common/BrokerConfig.java 27.20% <25.00%> (-0.03%) ⬇️
...a/org/apache/rocketmq/broker/BrokerController.java 44.26% <47.36%> (-2.20%) ⬇️
...ache/rocketmq/broker/topic/TopicConfigManager.java 56.81% <62.50%> (+0.13%) ⬆️

... and 20 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Ziy1-Tan Ziy1-Tan force-pushed the develop branch 7 times, most recently from 6882f04 to 4c3f678 Compare September 8, 2023 08:20
topicConfigWrapper.setTopicConfigTable(this.getTopicConfigManager().getTopicConfigTable());
if (this.brokerConfig.isEnableSplitRegistration()
&& topicConfigTable.size() >= this.brokerConfig.getSplitRegistrationSize()
&& needRegister(forceRegister)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to determine needRegister here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment on lines 1811 to 1815
private TopicConfigAndMappingSerializeWrapper buildSerializeWrapper(final ConcurrentMap<String, TopicConfig> topicConfigTable) {
return buildSerializeWrapper(topicConfigTable, Maps.newHashMap());
}

private TopicConfigAndMappingSerializeWrapper buildSerializeWrapper(
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better move these two methods to TopicConfigManager

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -396,6 +396,10 @@ public class BrokerConfig extends BrokerIdentity {

private boolean enableMixedMessageType = false;

private boolean enableSplitRegistration = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a reminder to the users that this switch cannot be used together with deleteTopicWithBrokerRegistration, otherwise there will be a loss of routing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

RongtongJin
RongtongJin previously approved these changes Sep 10, 2023
Copy link
Contributor

@joeCarf joeCarf left a comment

Choose a reason for hiding this comment

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

LGTM

@RongtongJin RongtongJin merged commit 0dbd077 into apache:develop Sep 11, 2023
8 of 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.

[Enhancement] Support for split nameserver registration
5 participants