JingsongLi commented on code in PR #328:
URL: https://github.com/apache/flink-table-store/pull/328#discussion_r1002843817


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/mergetree/compact/CompactStrategy.java:
##########
@@ -37,4 +37,7 @@ public interface CompactStrategy {
      * </ul>
      */
     Optional<CompactUnit> pick(int numLevels, List<LevelSortedRun> runs);
+
+    /** Pick compaction unit from runs. However this compaction is forced by 
the user. */
+    Optional<CompactUnit> forcedPick(int numLevels, List<LevelSortedRun> runs);

Review Comment:
   Do we need to add this method? It looks like a fixed implementation.



##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/mergetree/compact/MergeTreeCompactManager.java:
##########
@@ -80,43 +77,52 @@ public void addNewFile(DataFileMeta file) {
     }
 
     @Override
-    public void triggerCompaction() {
-        if (taskFuture != null) {
-            return;
+    public void triggerCompaction(boolean forcedCompaction) {
+        Optional<CompactUnit> optionalUnit;
+        if (forcedCompaction) {

Review Comment:
   I think `full compaction` is better than force compaction.
   



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