From d75ee3c36fc153f98c59b0c0293b66992fd21848 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 --- .../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 dd06ec1d1d..0dc68ed3e9 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 @@ -166,7 +166,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;