tkalkirill commented on code in PR #5305:
URL: https://github.com/apache/ignite-3/pull/5305#discussion_r1972941680
##########
modules/client/src/main/java/org/apache/ignite/internal/client/ReliableChannel.java:
##########
@@ -929,4 +931,18 @@ private boolean
isFutureInProgressOrDoneAndChannelOpen(@Nullable CompletableFutu
return ch != null && !ch.closed();
}
}
+
+ private void logFailedEstablishConnection(ClientChannelHolder ch,
Throwable err) {
+ String logMessage = "Failed to establish connection to " +
ch.chCfg.getAddress() + ": " + err.getMessage();
+
+ if (log.isDebugEnabled() ||
isLogFailedEstablishConnectionException(err)) {
+ log.warn(logMessage, err);
+ } else {
+ log.info(logMessage);
+ }
+ }
+
+ private static boolean isLogFailedEstablishConnectionException(Throwable
err) {
+ return hasCauseOrSuppressed(err, "Connection refused",
ConnectException.class);
Review Comment:
Added description and comment, I hope it became clearer.
--
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]