[fix](stream_load) Fix stream load IPv6 host parsing#64147
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
FE Regression Coverage ReportIncrement line coverage |
TPC-H: Total hot run time: 28699 ms |
TPC-DS: Total hot run time: 170252 ms |
|
/review |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
There was a problem hiding this comment.
Review opinion: no blocking issues found. The change is small and uses Guava HostAndPort to address the IPv6 parsing problem in stream-load redirect endpoint handling.
Critical checkpoint conclusions:
- Goal and proof: The implementation addresses colon-splitting failures for bracketed IPv6 host:port inputs. Existing tests do not directly prove the new IPv6 parsing behavior; adding focused LoadActionTest coverage for bracketed IPv6 Host headers and public/private endpoints would reduce regression risk.
- Scope and clarity: The modification is focused and minimal, limited to replacing ad-hoc parsing in LoadAction.
- Concurrency and lifecycle: No new shared state, locks, threads, static initialization dependency, or lifecycle-sensitive behavior was introduced.
- Configuration and compatibility: No new configuration or storage/protocol format change was introduced. Existing endpoint strings now need standard bracketed IPv6 host:port syntax, which is appropriate for disambiguating IPv6 ports.
- Parallel paths: The changed parsing is applied to both request Host parsing and backend public/private endpoint parsing in this redirect path. No separate equivalent parsing path was found in this PR.
- Error handling: Invalid endpoint formats are converted to LoadException/AnalysisException consistently with the surrounding code.
- Data correctness, transactions, persistence, and FE-BE variable passing: Not applicable to this HTTP redirect parsing change.
- Observability: Existing logs are sufficient for invalid header/endpoint diagnosis.
- Performance: No material performance concern; parsing happens per redirect request and avoids obvious hot-loop work.
User focus response: no additional user-provided review focus was specified.
Residual risk: IPv6 redirect URL construction appears safe because RestBaseController builds the URI from host/port components, but there is no direct test asserting the final redirect Location for IPv6 endpoints.
What problem does this PR solve?
Problem Summary:
In
LoadAction#splitHostAndPort, the endpoint string (e.g. backend'spublicEndpoint/privateEndpoint, inhost:portformat) was split by:to get the host and port. This does not work for IPv6 addresses since IPv6addresses themselves contain colons.
This PR uses Guava's
HostAndPort.fromStringto parse the endpoint string, which correctly handles both IPv4 and IPv6 formats.Release note
Fix stream load redirect failure when backend endpoint is an IPv6 address.
Check List (For Author)
Test
Behavior changed:
Does this need documentation?