public List<TTimePartitionSlot> autoCleanPartitionTable(
      long TTL, TTimePartitionSlot currentTimeSlot) {
    List<TTimePartitionSlot> removedTimePartitions = new ArrayList<>();
    Iterator<Map.Entry<TTimePartitionSlot, List<TConsensusGroupId>>> iterator =
        seriesPartitionMap.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<TTimePartitionSlot, List<TConsensusGroupId>> entry = iterator.next();
      TTimePartitionSlot timePartitionSlot = entry.getKey();
      if (timePartitionSlot.getStartTime() + TIME_PARTITION_INTERVAL + TTL
          <= currentTimeSlot.getStartTime()) {
        removedTimePartitions.add(timePartitionSlot);
        iterator.remove();
      }
    }
    return removedTimePartitions;
  }
Remove PartitionTable where the TimeSlot is expired.

@param TTL The Time To Live
@param currentTimeSlot The current TimeSlot
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/SeriesPartitionTable.java