private WALFlushListener log(WALEntry walEntry) {

    buffer.write(walEntry);
    // set handler for pipe
    walEntry.getWalFlushListener().getWalEntryHandler().setWalNode(this, walEntry.getMemTableId());
    return walEntry.getWalFlushListener();
  }
This class encapsulates {@link IWALBuffer} and {@link CheckpointManager}. If search is enabled,
the order of search index should be protected by the upper layer, and the value should start from
1.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java