@Override
  public void clear() {
    lockManager.globalWriteLock();
    try {
      releaseFlushMonitor.clearCachedMTreeStore(this);
      regionStatistics.setMemoryManager(null);
      memoryManager.clear(root);
      root = null;
      if (file != null) {
        try {
          file.clear();
          file.close();
        } catch (MetadataException | IOException e) {
          LOGGER.error("Error occurred during PBTree clear, {}", e.getMessage(), e);
        }
      }
      file = null;
    } finally {
      lockManager.globalWriteUnlock();
    }
  }
clear all the data of MTreeStore in memory and disk.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/CachedMTreeStore.java