THUMarkLau commented on code in PR #12476:
URL: https://github.com/apache/iotdb/pull/12476#discussion_r1642263576


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java:
##########
@@ -250,10 +250,14 @@ public void skipToGivenPosition(long pos) throws 
IOException {
         buffer.clear();
         channel.read(buffer);
         buffer.flip();
-        buffer.get();
+        CompressionType type = CompressionType.deserialize(buffer.get());
         currSegmentSize = buffer.getInt();
         if (posRemain >= currSegmentSize) {
           posRemain -= currSegmentSize;
+          channel.position(
+              channel.position()
+                  + currSegmentSize
+                  + (type == CompressionType.UNCOMPRESSED ? 0 : 
Integer.BYTES));

Review Comment:
   I add a comment for it, and rename the function.



##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties:
##########
@@ -1215,6 +1215,10 @@ data_replication_factor=1
 # Datatype: long
 # iot_consensus_cache_window_time_in_ms=-1
 
+# Enable Write Ahead Log compression.
+# Option: true, false
+# enable_wal_compression=false

Review Comment:
   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