DanielWang2035 commented on code in PR #17238:
URL: https://github.com/apache/iotdb/pull/17238#discussion_r3279085372


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALMetaData.java:
##########
@@ -78,16 +125,46 @@ public void addAll(WALMetaData metaData) {
     }
     buffersSize.addAll(metaData.getBuffersSize());
     memTablesId.addAll(metaData.getMemTablesId());
+    physicalTimes.addAll(metaData.getPhysicalTimes());
+    nodeIds.addAll(metaData.getNodeIds());
+    localSeqs.addAll(metaData.getLocalSeqs());
+    if (metaData.minDataTs < this.minDataTs) {
+      this.minDataTs = metaData.minDataTs;
+    }
+    if (metaData.maxDataTs > this.maxDataTs) {
+      this.maxDataTs = metaData.maxDataTs;
+    }
   }
 
   @Override
   public int serializedSize() {
-    return FIXED_SERIALIZED_SIZE
-        + buffersSize.size() * Integer.BYTES
-        + (memTablesId.isEmpty() ? 0 : Integer.BYTES + memTablesId.size() * 
Long.BYTES);
+    return serializedSize(WALFileVersion.V2);

Review Comment:
   The no-version overload keeps the previous V2 behavior for compatibility. V3 
is used explicitly when the WAL file version is V3.



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