private List<WALFlushListener> logDeletionInWAL(RelationalDeleteDataNode deleteDataNode) {
    if (config.getWalMode() == WALMode.DISABLE) {
      return Collections.emptyList();
    }
    List<WALFlushListener> walFlushListeners = new ArrayList<>();
    Set<TsFileProcessor> involvedProcessors = new HashSet<>();

    for (TableDeletionEntry modEntry : deleteDataNode.getModEntries()) {
      long startTime = modEntry.getStartTime();
      long endTime = modEntry.getEndTime();
      for (Map.Entry<Long, TsFileProcessor> entry : workSequenceTsFileProcessors.entrySet()) {
        if (TimePartitionUtils.satisfyPartitionId(startTime, endTime, entry.getKey())) {
          involvedProcessors.add(entry.getValue());
        }
      }
      for (Map.Entry<Long, TsFileProcessor> entry : workUnsequenceTsFileProcessors.entrySet()) {
        if (TimePartitionUtils.satisfyPartitionId(startTime, endTime, entry.getKey())) {
          involvedProcessors.add(entry.getValue());
        }
      }
    }

    for (TsFileProcessor involvedProcessor : involvedProcessors) {
      WALFlushListener walFlushListener = involvedProcessor.logDeleteDataNodeInWAL(deleteDataNode);
      walFlushListeners.add(walFlushListener);
    }

    return walFlushListeners;
  }
Separate tsfiles in TsFileManager to sealedList and unsealedList.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java