jt2594838 commented on code in PR #17901:
URL: https://github.com/apache/iotdb/pull/17901#discussion_r3393124857


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletRawReq.java:
##########
@@ -167,6 +155,33 @@ public static PipeTransferTabletRawReq 
fromTPipeTransferReq(final TPipeTransferR
     return tabletReq;
   }
 
+  private void deserializeTPipeTransferRawReq(
+      final ByteBuffer buffer, final TabletStringInternPool 
tabletStringInternPool) {
+    final int startPosition = buffer.position();
+    try {
+      final InsertTabletStatement insertTabletStatement =
+          TabletStatementConverter.deserializeLegacyStatementFromTabletFormat(
+              buffer, tabletStringInternPool);
+      isAligned = insertTabletStatement.isAligned();
+      statement = insertTabletStatement;
+      return;
+    } catch (final Exception e) {
+      buffer.position(startPosition);
+    }
+
+    try {
+      final InsertTabletStatement insertTabletStatement =
+          TabletStatementConverter.deserializeStatementFromTabletFormat(
+              buffer, false, tabletStringInternPool);
+      isAligned = insertTabletStatement.isAligned();
+      statement = insertTabletStatement;
+    } catch (final Exception e) {
+      buffer.position(startPosition);
+      tablet = PipeTabletUtils.internTablet(Tablet.deserialize(buffer), 
tabletStringInternPool);
+      isAligned = ReadWriteIOUtils.readBool(buffer);
+    }
+  }

Review Comment:
   It would be better to try the current version to reduce general overhead.
   And, add some comments to explain what is being done.



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