You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/06/16 07:20:24 UTC

[GitHub] [iotdb] THUMarkLau opened a new pull request #3416: [To new_compaction] format the code

THUMarkLau opened a new pull request #3416:
URL: https://github.com/apache/iotdb/pull/3416


   apply spotless


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] qiaojialin merged pull request #3416: [To new_compaction] format the code

Posted by GitBox <gi...@apache.org>.
qiaojialin merged pull request #3416:
URL: https://github.com/apache/iotdb/pull/3416


   


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] EJTTianYu commented on a change in pull request #3416: [To new_compaction] format the code

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [iotdb] EJTTianYu commented on a change in pull request #3416: [To new_compaction] format the code

Posted by GitBox <gi...@apache.org>.
EJTTianYu commented on a change in pull request #3416:
URL: https://github.com/apache/iotdb/pull/3416#discussion_r652418878



##########
File path: server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
##########
@@ -298,62 +298,45 @@
   /** When average series point number reaches this, flush the memtable to disk */
   private int avgSeriesPointNumberThreshold = 10000;
 
-  /**
-   * Work when tsfile_manage_strategy is level_strategy. When merge point number reaches this, merge
-   * the files to the last level. During a merge, if a chunk with less number of chunks than this
-   * parameter, the chunk will be merged with its succeeding chunks even if it is not overflowed,
-   * until the merged chunks reach this threshold and the new chunk will be flushed.
-   */
-  private int mergeChunkPointNumberThreshold = 100000;
+  /** Only compact the sequence files */
+  private boolean enableSeqSpaceCompaction = true;
 
-  /**
-   * Works when the compaction_strategy is LEVEL_COMPACTION. When point number of a page reaches
-   * this, use "append merge" instead of "deserialize merge".
-   */
-  private int mergePagePointNumberThreshold = 100;
-
-  /** LEVEL_COMPACTION, NO_COMPACTION */
-  private CompactionStrategy compactionStrategy = CompactionStrategy.LEVEL_COMPACTION;
+  /** Only compact the unsequence files */
+  private boolean enableUnseqSpaceCompaction = true;
 
-  /**
-   * Works when the compaction_strategy is LEVEL_COMPACTION. Whether to merge unseq files into seq
-   * files or not.
-   */
-  private boolean enableUnseqCompaction = true;
+  /** Compact the unseqence files into the overlapped sequence files */

Review comment:
       unseqence > unsequence




-- 
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:
users@infra.apache.org