private void tryLoadSegment() throws IOException {
    long originPosition = channel.position();
    try {
      loadNextSegmentV1();
      version = WALFileVersion.V1;
    } catch (Throwable e) {
      // failed to load in V2 way, try in V1 way
      channel.position(originPosition);
      loadNextSegmentV2();
      version = WALFileVersion.V2;
      logger.info("Failed to load WAL segment in V1 way, try in V2 way successfully.");
    }
  }
1 byte for whether enable compression, 4 byte for compressedSize
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java