From 36efba9000c6bcc5795f661b0f9502e5ac6cc834 Mon Sep 17 00:00:00 2001 From: Yukang-Lian Date: Thu, 5 Dec 2024 15:13:50 +0800 Subject: [PATCH] 4 --- be/src/olap/cumulative_compaction_policy.cpp | 3 -- be/src/olap/tablet_manager.cpp | 3 -- .../test_cumu_compaction_with_delete.out | 3 -- .../test_cumu_compaction_with_delete.groovy | 54 ------------------- 4 files changed, 63 deletions(-) delete mode 100644 regression-test/data/compaction/test_cumu_compaction_with_delete.out delete mode 100644 regression-test/suites/compaction/test_cumu_compaction_with_delete.groovy diff --git a/be/src/olap/cumulative_compaction_policy.cpp b/be/src/olap/cumulative_compaction_policy.cpp index fd9393558250f58..ee7a2b1812a0ae9 100644 --- a/be/src/olap/cumulative_compaction_policy.cpp +++ b/be/src/olap/cumulative_compaction_policy.cpp @@ -286,9 +286,6 @@ int SizeBasedCumulativeCompactionPolicy::pick_input_rowsets( } DBUG_EXECUTE_IF("SizeBaseCumulativeCompactionPolicy.pick_input_rowsets.return_input_rowsets", { return transient_size; }) - DBUG_EXECUTE_IF( - "SizeBaseCumulativeCompactionPolicy.pick_input_rowsets.set_promotion_size_to_max", - { promotion_size = INT64_MAX; }) if (total_size >= promotion_size) { return transient_size; diff --git a/be/src/olap/tablet_manager.cpp b/be/src/olap/tablet_manager.cpp index a9f2e439aff3704..a18dc0b4a161b69 100644 --- a/be/src/olap/tablet_manager.cpp +++ b/be/src/olap/tablet_manager.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -776,8 +775,6 @@ std::vector TabletManager::find_best_tablets_to_compaction( last_failure_ms = tablet_ptr->last_base_compaction_failure_time(); } if (now_ms - last_failure_ms <= 5000) { - DBUG_EXECUTE_IF("TabletManager::find_best_tablets_to_compaction.dcheck", - { DCHECK(false) << "Too often to check compaction"; }) VLOG_DEBUG << "Too often to check compaction, skip it. " << "compaction_type=" << compaction_type_str << ", last_failure_time_ms=" << last_failure_ms diff --git a/regression-test/data/compaction/test_cumu_compaction_with_delete.out b/regression-test/data/compaction/test_cumu_compaction_with_delete.out deleted file mode 100644 index 12b32ed478443ab..000000000000000 --- a/regression-test/data/compaction/test_cumu_compaction_with_delete.out +++ /dev/null @@ -1,3 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !6 -- - diff --git a/regression-test/suites/compaction/test_cumu_compaction_with_delete.groovy b/regression-test/suites/compaction/test_cumu_compaction_with_delete.groovy deleted file mode 100644 index b5a641faa9d9196..000000000000000 --- a/regression-test/suites/compaction/test_cumu_compaction_with_delete.groovy +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -import org.codehaus.groovy.runtime.IOGroovyMethods - -suite("test_cumu_compaction_with_delete") { - def tableName = "test_cumu_compaction_with_delete" - - GetDebugPoint().clearDebugPointsForAllBEs() - try { - GetDebugPoint().enableDebugPointForAllBEs("SizeBaseCumulativeCompactionPolicy.pick_input_rowsets.set_promotion_size_to_max") - GetDebugPoint().enableDebugPointForAllBEs("TabletManager::find_best_tablets_to_compaction.dcheck") - - sql """ DROP TABLE IF EXISTS ${tableName} """ - sql """ - CREATE TABLE ${tableName} ( - `user_id` INT NOT NULL, - `value` INT NOT NULL) - UNIQUE KEY(`user_id`) - DISTRIBUTED BY HASH(`user_id`) - BUCKETS 1 - PROPERTIES ("replication_allocation" = "tag.location.default: 1", - "enable_mow_light_delete" = "true")""" - - for(int i = 1; i <= 100; ++i){ - sql """ INSERT INTO ${tableName} VALUES (1,1)""" - sql """ delete from ${tableName} where user_id = 1""" - Thread.sleep(500) - } - - qt_6 """select * from ${tableName} order by user_id, value""" - } catch (Exception e){ - logger.info(e.getMessage()) - assertFalse(true) - } finally { - try_sql("DROP TABLE IF EXISTS ${tableName} FORCE") - GetDebugPoint().disableDebugPointForAllBEs("SizeBaseCumulativeCompactionPolicy.pick_input_rowsets.set_promotion_size_to_max") - GetDebugPoint().disableDebugPointForAllBEs("TabletManager::find_best_tablets_to_compaction.dcheck") - } -}