From 6da0068541ad5680a2f0eed61ce8d6a82a94e5b5 Mon Sep 17 00:00:00 2001 From: cell Date: Thu, 14 Sep 2023 09:44:53 +0800 Subject: [PATCH] [AMORO-1924]Fix Iceberg tables undergoing major optimizing repeatedly (#1976) fix full FullOptimizing bug Co-authored-by: zhengliu --- .../server/optimizing/plan/CommonPartitionEvaluator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ams/server/src/main/java/com/netease/arctic/server/optimizing/plan/CommonPartitionEvaluator.java b/ams/server/src/main/java/com/netease/arctic/server/optimizing/plan/CommonPartitionEvaluator.java index 9b015f8311..c582d50915 100644 --- a/ams/server/src/main/java/com/netease/arctic/server/optimizing/plan/CommonPartitionEvaluator.java +++ b/ams/server/src/main/java/com/netease/arctic/server/optimizing/plan/CommonPartitionEvaluator.java @@ -209,7 +209,11 @@ private void addDelete(ContentFile delete) { @Override public boolean isNecessary() { if (necessary == null) { - necessary = isFullNecessary() || isMajorNecessary() || isMinorNecessary(); + if (isFullOptimizing()) { + necessary = isFullNecessary(); + } else { + necessary = isMajorNecessary() || isMinorNecessary(); + } LOG.debug("{} necessary = {}, {}", name(), necessary, this); } return necessary;