From 7e434a09a5570ff836a133fbf404dd7976aea197 Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 16 Mar 2023 03:11:01 +0000 Subject: [PATCH] Fix remove longops failed --- src/rootserver/ddl_task/ob_ddl_scheduler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rootserver/ddl_task/ob_ddl_scheduler.cpp b/src/rootserver/ddl_task/ob_ddl_scheduler.cpp index 601d7c2974..e121032fe2 100644 --- a/src/rootserver/ddl_task/ob_ddl_scheduler.cpp +++ b/src/rootserver/ddl_task/ob_ddl_scheduler.cpp @@ -1937,8 +1937,10 @@ int ObDDLScheduler::remove_task_from_longops_mgr(ObDDLTask *ddl_task) ret = OB_INVALID_ARGUMENT; LOG_WARN("invalid arguments", K(ret), KP(ddl_task)); } else if (ddl_task->support_longops_monitoring()) { - if (OB_FAIL(longops_mgr.unregister_longops(ddl_task->get_longops_stat()))) { - LOG_WARN("failed to unregister longops", K(ret)); + if (OB_NOT_NULL(ddl_task->get_longops_stat())) { + if (OB_FAIL(longops_mgr.unregister_longops(ddl_task->get_longops_stat()))) { + LOG_WARN("failed to unregister longops", K(ret)); + } } } return ret;