Caideyipi commented on code in PR #17901:
URL: https://github.com/apache/iotdb/pull/17901#discussion_r3393205982
##########
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:
Addressed in fc354949354: try the current V1 tablet format first, then fall
back to the legacy reader, with comments explaining the fallback path.
--
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]