From 4a0238e2da4c9933536f38cb2c7df202e2a8bcb1 Mon Sep 17 00:00:00 2001 From: wq Date: Wed, 16 Jun 2021 13:50:49 +0800 Subject: [PATCH] fix unexpected logs of ddl_task_executor --- src/share/ob_ddl_task_executor.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/share/ob_ddl_task_executor.cpp b/src/share/ob_ddl_task_executor.cpp index 3321d7da0..d11143efc 100644 --- a/src/share/ob_ddl_task_executor.cpp +++ b/src/share/ob_ddl_task_executor.cpp @@ -173,17 +173,24 @@ ObDDLTaskExecutor::~ObDDLTaskExecutor() void ObDDLTaskExecutor::stop() { - TG_STOP(tg_id_); + if (tg_id_ >= 0) { + TG_STOP(tg_id_); + } } void ObDDLTaskExecutor::wait() { - TG_WAIT(tg_id_); + if (tg_id_ >= 0) { + TG_WAIT(tg_id_); + } } void ObDDLTaskExecutor::destroy() { - TG_DESTROY(tg_id_); + if (tg_id_ >= 0) { + TG_DESTROY(tg_id_); + tg_id_ = -1; + } task_queue_.destroy(); is_inited_ = false; cond_.destroy();