@Override
  public boolean createSnapshot(File snapshotDir) {
    lockManager.globalWriteLock();
    try {
      flushVolatileNodes(false);
      return file.createSnapshot(snapshotDir);
    } 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