Skip to content

[ISSUE #10830] fix(common): preserve hyphens in DLedger peer addresses - #10840

Open
yuluo-yx wants to merge 1 commit into
apache:developfrom
yuluo-yx:0808-yuluo/fix-2
Open

[ISSUE #10830] fix(common): preserve hyphens in DLedger peer addresses#10840
yuluo-yx wants to merge 1 commit into
apache:developfrom
yuluo-yx:0808-yuluo/fix-2

Conversation

@yuluo-yx

@yuluo-yx yuluo-yx commented Aug 8, 2026

Copy link
Copy Markdown
Member

Which Issue(s) This PR Fixes

Brief Description

Split DLedger peer entries only once so addresses containing hyphens are returned intact.

How Did You Test This Change?

  • mise x java@temurin-17 -- mvn -pl common -Dtest=ControllerConfigTest test

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.35%. Comparing base (fd0c959) to head (de79d54).

Files with missing lines Patch % Lines
...a/org/apache/rocketmq/common/ControllerConfig.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10840      +/-   ##
=============================================
- Coverage      48.37%   48.35%   -0.03%     
+ Complexity     13555    13538      -17     
=============================================
  Files           1380     1380              
  Lines         101165   101166       +1     
  Branches       13127    13127              
=============================================
- Hits           48940    48920      -20     
- Misses         46250    46254       +4     
- Partials        5975     5992      +17     

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

@RockteMQ-AI RockteMQ-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.

LGTM. Correct fix — using split(":", 2) preserves hyphens in DLedger peer addresses (e.g., n0-10911:n1-10912). The previous unbounded split would break addresses containing colons in the peer identifier.


Automated review by github-manager-bot

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.

ControllerConfig truncates DLedger peer addresses containing hyphens

3 participants