You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/11/23 09:02:39 UTC
[GitHub] [iotdb] Beyyes commented on a diff in pull request #8068: [IOTDB-4830] Fixed some bugs
Beyyes commented on code in PR #8068:
URL: https://github.com/apache/iotdb/pull/8068#discussion_r1030176420
##########
confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java:
##########
@@ -93,18 +88,13 @@ public TSStatus sendSyncRequestToDataNodeWithGivenRetry(
return executeSyncRequest(requestType, client, req);
} catch (TException | IOException e) {
lastException = e;
- LOGGER.warn(
- "{} failed on DataNode {}, because {}, retrying {}...",
- requestType,
- endPoint,
- e.getMessage(),
- retry + 1);
if (retry != retryNum - 1) {
+ LOGGER.warn("{} failed on DataNode {}, retrying {}...", requestType, endPoint, retry + 1);
doRetryWait(retry);
}
}
}
- LOGGER.error("{} failed on DataNode {}", requestType, endPoint, lastException);
Review Comment:
keep the `lastException `
##########
confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java:
##########
@@ -178,11 +168,11 @@ public TSStatus changeRegionLeader(
TRegionLeaderChangeReq req = new TRegionLeaderChangeReq(regionId, newLeaderNode);
status = client.changeRegionLeader(req);
} catch (IOException e) {
- LOGGER.error("Can't connect to Data node: {}", dataNode, e);
+ LOGGER.error("Can't connect to Data node: {}", dataNode);
status = new TSStatus(TSStatusCode.CAN_NOT_CONNECT_DATANODE.getStatusCode());
status.setMessage(e.getMessage());
} catch (TException e) {
- LOGGER.error("Change regions leader error on Date node: {}", dataNode, e);
+ LOGGER.error("Change regions leader error on Date node: {}", dataNode);
Review Comment:
```suggestion
LOGGER.error("Change regions leader error on Date node: {}, e", dataNode);
```
##########
confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java:
##########
@@ -178,11 +168,11 @@ public TSStatus changeRegionLeader(
TRegionLeaderChangeReq req = new TRegionLeaderChangeReq(regionId, newLeaderNode);
status = client.changeRegionLeader(req);
} catch (IOException e) {
- LOGGER.error("Can't connect to Data node: {}", dataNode, e);
+ LOGGER.error("Can't connect to Data node: {}", dataNode);
Review Comment:
```suggestion
LOGGER.error("Can't connect to Data node: {}", dataNode, e);
```
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org