Skip to content

Commit

Permalink
Update IoTDBSyncClientManager.java
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveYurongSu committed Jan 18, 2025
1 parent 802f357 commit b5abedc
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void checkClientStatusAndTryReconstructIfNecessary() {
for (final Map.Entry<TEndPoint, String> entry : endPoint2HandshakeErrorMessage.entrySet()) {
errorMessage
.append(" (")
.append(" host: ")
.append("host: ")
.append(entry.getKey().getIp())
.append(", port: ")
.append(entry.getKey().getPort())
Expand Down Expand Up @@ -183,17 +183,17 @@ private boolean initClientAndStatus(
useSSL,
trustStorePath,
trustStorePwd));
return true;
} catch (Exception e) {
endPoint2HandshakeErrorMessage.put(endPoint, e.getMessage());
LOGGER.info(
String.format(
PipeConnectionException.CONNECTION_ERROR_FORMATTER,
endPoint.getIp(),
endPoint.getPort()),
LOGGER.warn(
"Failed to initialize client with target server ip: {}, port: {}, because {}",
endPoint.getIp(),
endPoint.getPort(),
e.getMessage(),
e);
return false;
}
return true;
}

public void sendHandshakeReq(final Pair<IoTDBSyncClient, Boolean> clientAndStatus) {
Expand All @@ -217,7 +217,7 @@ public void sendHandshakeReq(final Pair<IoTDBSyncClient, Boolean> clientAndStatu
// Receiver may be an old version, so we need to retry to handshake by
// PipeTransferHandshakeV1Req.
if (resp.getStatus().getCode() == TSStatusCode.PIPE_TYPE_ERROR.getStatusCode()) {
LOGGER.info(
LOGGER.warn(
"Handshake error with target server ip: {}, port: {}, because: {}. "
+ "Retry to handshake by PipeTransferHandshakeV1Req.",
client.getIpAddress(),
Expand Down

0 comments on commit b5abedc

Please sign in to comment.