beautyarbutin opened a new pull request, #11199: URL: https://github.com/apache/rocketmq/pull/11199
### Which Issue(s) This PR Fixes - Fixes #10834 ### Brief Description `RemotingHelper.parseHostFromAddress` previously split every address on `:`, so a bracketed IPv6 broker address such as `[2001:db8::1]:10911` was truncated to `[2001`. `BrokerPreOnlineService` uses this host when preparing HA connection-state notifications, which makes the notification target invalid for IPv6 brokers. This change extracts the host inside brackets for bracketed IPv6 addresses. It preserves the existing behavior for IPv4 and hostname addresses, retains unbracketed IPv6 literals, and avoids truncating malformed bracketed input. This reimplements the fix from the earlier, closed PR #10844 against the current `develop` branch. Thanks to @yuluo-yx for the original report and patch. ### How Did You Test This Change? - Red-first regression: the new test failed on the previous implementation because `[2001:db8::1]:10911` returned `[2001`. - `mvn -B -ntp -pl remoting -DskipITs test` - Result: 182 tests passed, with no failures, errors, or skips. - Checkstyle: 0 violations. - SpotBugs: 0 bugs and 0 errors. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
