SteveYurongSu commented on code in PR #11994:
URL: https://github.com/apache/iotdb/pull/11994#discussion_r1469404227
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/protocol/thrift/sync/IoTDBThriftSyncClientManager.java:
##########
@@ -134,12 +138,29 @@ private void reconstructClient(TEndPoint endPoint) throws
IOException {
}
try {
- final TPipeTransferResp resp =
+ HashMap<String, String> params = new HashMap<>();
+ params.put(
+ PipeConstant.HANDSHAKE_KEY_TIME_PRECISION,
+ CommonDescriptor.getInstance().getConfig().getTimestampPrecision());
+ params.put(PipeConstant.HANDSHAKE_KEY_CLUSTER_ID,
PipeRuntimeAgent.getClusterId());
+
+ TPipeTransferResp resp =
clientAndStatus
.getLeft()
- .pipeTransfer(
- PipeTransferHandshakeReq.toTPipeTransferReq(
-
CommonDescriptor.getInstance().getConfig().getTimestampPrecision()));
+
.pipeTransfer(PipeTransferHandshakeV2Req.toTPipeTransferReq(params));
+ if (resp.getStatus().getCode() !=
TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
+ // Retry to handshake by PipeTransferHandshakeV1Req.
Review Comment:
How to judge the diff between network error and cluster id error>?
--
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]