public void unpinMemTable(long memTableId) throws MemTablePinException {
    infoLock.lock();
    try {
      if (!memTableId2Info.containsKey(memTableId)) {
        throw new MemTablePinException(
            String.format(
                "Fail to unpin memTable-%d because this memTable doesn't exist in the wal.",
                memTableId));
      }
      if (!memTableId2Info.get(memTableId).isPinned()) {
        throw new MemTablePinException(
            String.format(
                "Fail to unpin memTable-%d because this memTable hasn't been pinned.", memTableId));
      }
      MemTableInfo memTableInfo = memTableId2Info.get(memTableId);
      memTableInfo.unpin();
      if (!memTableInfo.isPinned()) {
        WALInsertNodeCache.getInstance().removeMemTable(memTableId);
        if (memTableInfo.isFlushed()) {
          memTableId2Info.remove(memTableId);
        }
      }
    } finally {
      infoLock.unlock();
    }
  }
Unpin the wal files of the given memory table.

@throws MemTablePinException If there aren't corresponding pin operations
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/checkpoint/CheckpointManager.java