Copilot commented on code in PR #702:
URL:
https://github.com/apache/doris-flink-connector/pull/702#discussion_r4044794991
##########
flink-doris-connector/src/main/java/org/apache/doris/flink/rest/RestService.java:
##########
@@ -280,7 +281,13 @@ public static String randomEndpoint(String feNodes, Logger
logger)
}
List<String> nodes = Arrays.asList(feNodes.split(","));
Collections.shuffle(nodes);
- return nodes.get(0).trim();
+ for (String feNode : nodes) {
+ if (BackendUtil.tryHttpConnection(feNode)) {
+ return feNode;
+ }
Review Comment:
`feNodes.split(",")` preserves whitespace, so a normal configuration such as
`fe1:8030, fe2:8030` passes `" fe2:8030"` to the probe and returns the
untrimmed value. The old implementation trimmed the selected endpoint, so this
change makes otherwise valid multi-FE configurations fail (or produce an
invalid request URL); trim each node before probing and returning it.
--
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]