Caideyipi commented on code in PR #11994:
URL: https://github.com/apache/iotdb/pull/11994#discussion_r1474436422


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/protocol/thrift/sync/IoTDBThriftSyncClientManager.java:
##########
@@ -163,6 +202,8 @@ private void reconstructClient(TEndPoint endPoint) throws 
IOException {
           endPoint.getPort(),
           e.getMessage(),
           e);
+    } catch (IOException e) {
+      throw new RuntimeException(e);

Review Comment:
   Throw another kind of exception here



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/airgap/IoTDBAirGapReceiver.java:
##########
@@ -117,12 +118,18 @@ private void receive() throws IOException {
       final ByteBuffer byteBuffer = ByteBuffer.wrap(data, LONG_LEN, 
data.length - LONG_LEN);
 
       // Pseudo request, to reuse logic in IoTDBThriftReceiverAgent
+      byte version = ReadWriteIOUtils.readByte(byteBuffer);
+      short type = ReadWriteIOUtils.readShort(byteBuffer);
+      if (type == PipeRequestType.HANDSHAKE_V2.getType()) {

Review Comment:
   What about only serialize the useful contents instead of get the buffer 
length here?



-- 
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]

Reply via email to