From 04bf3ccac6f3297cb32f9251afb226c3ce38852a Mon Sep 17 00:00:00 2001 From: GavinH1984 <3989958@qq.com> Date: Fri, 22 Dec 2023 10:03:10 +0800 Subject: [PATCH] [AMORO-2464] Fix bug AMS will repeat trigger the same minor optimize when the bucket > self-optimizing.minor.trigger.file-count (#2465) Fix the bug: https://github.com/NetEase/amoro/issues/2464 [Bug]: AMS will repeat trigger the same minor optimize when the bucket > self-optimizing.minor.trigger.file-count (cherry picked from commit 8facf5b3698f44cdb348759a98d7c3cd4c58afe4) Signed-off-by: zhoujinsong --- .../server/optimizing/plan/MixedIcebergPartitionPlan.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ams/server/src/main/java/com/netease/arctic/server/optimizing/plan/MixedIcebergPartitionPlan.java b/ams/server/src/main/java/com/netease/arctic/server/optimizing/plan/MixedIcebergPartitionPlan.java index 1c2730b47a..5d5f3fda4a 100644 --- a/ams/server/src/main/java/com/netease/arctic/server/optimizing/plan/MixedIcebergPartitionPlan.java +++ b/ams/server/src/main/java/com/netease/arctic/server/optimizing/plan/MixedIcebergPartitionPlan.java @@ -155,7 +155,7 @@ public boolean isMinorNecessary() { if (keyedTable) { int smallFileCount = fragmentFileCount + equalityDeleteFileCount; int baseSplitCount = getBaseSplitCount(); - if (smallFileCount >= Math.max(baseSplitCount, config.getMinorLeastFileCount())) { + if (smallFileCount >= Math.max(baseSplitCount + 1, config.getMinorLeastFileCount())) { return true; } else if ((smallFileCount > baseSplitCount || hasChangeFiles) && reachMinorInterval()) { return true;