public Pair<ByteBuffer, InsertNode> getByteBufferOrInsertNodeIfPossible() {
    return cache.getByteBufferOrInsertNodeIfPossible(this);
  }
Try to read the wal entry directly from the cache. No need to check if the wal entry is ready
for read.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/WALEntryPosition.java