public WALInputStream openReadFileStream() throws IOException {
    // TODO: Refactor this part of code
    if (isInSealedFile()) {
      walFile = walNode.getWALFile(walFileVersionId);
      return new WALInputStream(walFile);
    } else {
      try {
        walFile = walNode.getWALFile(walFileVersionId);
        return new WALInputStream(walFile);
      } catch (IOException e) {
        // unsealed file may be renamed after sealed, so we should try again
        if (isInSealedFile()) {
          walFile = walNode.getWALFile(walFileVersionId);
          return new WALInputStream(walFile);
        } else {
          throw e;
        }
      }
    }
  }
Open the read file channel for this wal entry, this method will retry automatically when the
file is sealed when opening the file channel.

@throws IOException failing to open the file channel.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/WALEntryPosition.java