HeimingZ commented on a change in pull request #5320:
URL: https://github.com/apache/iotdb/pull/5320#discussion_r836338739
##########
File path:
server/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertMultiTabletPlan.java
##########
@@ -280,6 +295,21 @@ public void serializeImpl(ByteBuffer buffer) {
}
}
+ @Override
+ public void serializeToWAL(IWALByteBufferView buffer) {
+ int type = PhysicalPlanType.MULTI_BATCH_INSERT.ordinal();
+ buffer.put((byte) type);
+ buffer.putInt(insertTabletPlanList.size());
+ for (InsertTabletPlan insertTabletPlan : insertTabletPlanList) {
+ insertTabletPlan.subSerialize(buffer);
+ }
+
+ buffer.putInt(parentInsertTabletPlanIndexList.size());
+ for (Integer index : parentInsertTabletPlanIndexList) {
+ buffer.putInt(index);
+ }
+ }
+
Review comment:
The code logic are same, but IWALByteBufferView encapsulates some
actions to deal with BufferOverflowException.
--
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]