CRZbulabula commented on code in PR #14737:
URL: https://github.com/apache/iotdb/pull/14737#discussion_r1924823068


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java:
##########
@@ -136,21 +142,31 @@ public class PartitionManager {
   private static final String CONSENSUS_WRITE_ERROR =
       "Failed in the write API executing the consensus layer due to: ";
 
-  /** Region cleaner. */
   // Monitor for leadership change
   private final Object scheduleMonitor = new Object();
 
+  /** Region cleaner. */
   // Try to delete Regions in every 10s
   private static final int REGION_MAINTAINER_WORK_INTERVAL = 10;
+
   private final ScheduledExecutorService regionMaintainer;
   private Future<?> currentRegionMaintainerFuture;
 
+  /** Partition cleaner. */
+  private static final long PARTITION_CLEANER_WORK_INTERVAL = 
COMMON_CONFIG.getTTLCheckInterval();
+
+  private final ScheduledExecutorService partitionCleaner;
+  private Future<?> currentPartitionCleanerFuture;
+
   public PartitionManager(IManager configManager, PartitionInfo partitionInfo) 
{
     this.configManager = configManager;
     this.partitionInfo = partitionInfo;
     this.regionMaintainer =
         IoTDBThreadPoolFactory.newSingleThreadScheduledExecutor(
             ThreadName.CONFIG_NODE_REGION_MAINTAINER.getName());
+    this.partitionCleaner =

Review Comment:
   Sure. I now employ the PartitionTableAutoCleaner rather than creating an 
extra thread pool.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to