yonchicy opened a new pull request, #70766: URL: https://github.com/apache/doris/pull/70766
### Background Doris Cloud components assume IPv4 today: `priority_networks` parsing only accepts IPv4 CIDR, the meta service BRPC server always binds `0.0.0.0`, endpoint strings are built as `host:port` (ambiguous for IPv6), and the FE meta service endpoint list cannot express IPv6 endpoints. ### What changed - `CIDR` parses both IPv4 and IPv6 networks with `inet_pton`, compares addresses by address family and prefix length, so IPv6 CIDR works in `priority_networks`. - `get_local_ip` enumerates IPv4 and IPv6 interface addresses, and the selected address family is exposed through `get_service_bind_address()` (`[::0]` or `0.0.0.0`). The cloud BRPC server binds to it with `butil::str2endpoint`. - New `get_host_port()` renders endpoints as `host:port` or `[host]:port`; it is used by the meta service registry, node decommission/status handling, the recycler and the checker. - FE `MetaServiceListResolverProvider` stores the comma-separated endpoint list in the URI path, so IPv6 endpoints containing `[` `]` and `,` parse correctly; legacy `ms-list://<authority>` targets keep working. ### Tests - New `MetaServiceListResolverProviderTest`: IPv6 list, IPv4 list and legacy authority target (3 cases, passing locally with JUnit 5). - New `NetWorkUtilTest.GetIpv6LocalHostTest` and `NetWorkUtilTest.GetHostPortTest`. - `mvn checkstyle:check -pl fe-core` passes. - `clang-format` (16) is clean for all changed C++ files, and every changed cloud translation unit passes `clang++ -fsyntax-only -Werror`. - The full cloud CMake build was not run in this environment. ### Compatibility and risk - IPv4 deployments keep the previous behavior when `priority_networks` is IPv4. - On hosts that have both IPv4 and IPv6 addresses and no `priority_networks`, an IPv6 address may now be selected; set `priority_networks` to pin the address family. - Endpoints of IPv6 nodes are rendered as `[address]:port`. ### Documentation No documentation change in this repository. ### Related issue None. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
