From 5e959002ae274d36933a217b64915520fd696af3 Mon Sep 17 00:00:00 2001 From: HappenLee Date: Mon, 23 Nov 2020 21:01:18 +0800 Subject: [PATCH] [Bug] Fix be ut compile failed and core in delta_writer_test when ulimit < 60000. --- be/src/olap/storage_engine.cpp | 1 - be/test/olap/delta_writer_test.cpp | 8 +++++--- be/test/runtime/fragment_mgr_test.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/be/src/olap/storage_engine.cpp b/be/src/olap/storage_engine.cpp index 221754a9b2687d..be3fbf1f9193cd 100644 --- a/be/src/olap/storage_engine.cpp +++ b/be/src/olap/storage_engine.cpp @@ -139,7 +139,6 @@ StorageEngine::~StorageEngine() { DEREGISTER_HOOK_METRIC(unused_rowsets_count); DEREGISTER_HOOK_METRIC(compaction_mem_current_consumption); _clear(); - _compaction_thread_pool->shutdown(); } void StorageEngine::load_data_dirs(const std::vector& data_dirs) { diff --git a/be/test/olap/delta_writer_test.cpp b/be/test/olap/delta_writer_test.cpp index 7e5750c12331f2..336fb112d06fb8 100644 --- a/be/test/olap/delta_writer_test.cpp +++ b/be/test/olap/delta_writer_test.cpp @@ -70,9 +70,11 @@ void set_up() { } void tear_down() { - k_engine->stop(); - delete k_engine; - k_engine = nullptr; + if (k_engine != nullptr) { + k_engine->stop(); + delete k_engine; + k_engine = nullptr; + } system("rm -rf ./data_test"); FileUtils::remove_all(std::string(getenv("DORIS_HOME")) + UNUSED_PREFIX); } diff --git a/be/test/runtime/fragment_mgr_test.cpp b/be/test/runtime/fragment_mgr_test.cpp index eb23dd98c30c50..f3d868996a3558 100644 --- a/be/test/runtime/fragment_mgr_test.cpp +++ b/be/test/runtime/fragment_mgr_test.cpp @@ -39,7 +39,7 @@ PlanFragmentExecutor::~PlanFragmentExecutor() {} Status PlanFragmentExecutor::prepare( const TExecPlanFragmentParams& request, - const BatchFragmentsCtx* batch_ctx) { + const QueryFragmentsCtx* batch_ctx) { return s_prepare_status; }