public void pinMemTable() throws MemTablePinException {
    if (walNode == null || memTableId < 0) {
      throw new MemTablePinException("Fail to pin memTable because of internal error.");
    }
    walNode.pinMemTable(memTableId);
  }
Pin the wal files of the given memory table. Notice: cannot pin one memTable too long,
otherwise the wal disk usage may too large.

@throws MemTablePinException If the memTable has been flushed
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/WALEntryHandler.java