private void makeSureNoOldRegion(DataRegionId regionId) {
    while (deletingDataRegionMap.containsKey(regionId)) {
      DataRegion oldRegion = deletingDataRegionMap.get(regionId);
      if (oldRegion != null) {
        oldRegion.waitForDeleted();
      }
    }
  }
Add a listener to listen file close events. Notice that this addition only applies to
TsFileProcessors created afterward.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/StorageEngine.java