EJTTianYu commented on a change in pull request #3416:
URL: https://github.com/apache/iotdb/pull/3416#discussion_r652421629



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/compaction/CompactionTaskManager.java
##########
@@ -43,20 +43,22 @@
 import java.util.concurrent.Future;
 import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import static 
org.apache.iotdb.db.engine.compaction.utils.CompactionLogger.COMPACTION_LOG_NAME;
 
 /** CompactionMergeTaskPoolManager provides a ThreadPool to queue and run all 
compaction tasks. */
-public class CompactionMergeTaskPoolManager implements IService {
+public class CompactionTaskManager implements IService {
 
-  private static final Logger logger =
-      LoggerFactory.getLogger(CompactionMergeTaskPoolManager.class);
-  private static final CompactionMergeTaskPoolManager INSTANCE =
-      new CompactionMergeTaskPoolManager();
+  private static final Logger logger = 
LoggerFactory.getLogger(CompactionTaskManager.class);
+  private static final CompactionTaskManager INSTANCE = new 
CompactionTaskManager();
   private ExecutorService pool;
   private Map<String, Set<Future<Void>>> storageGroupTasks = new 
ConcurrentHashMap<>();
+  private AtomicInteger currentTaskNum = new AtomicInteger(0);

Review comment:
       Decrease the value when the compaction is complete




-- 
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.

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


Reply via email to