From dcf84f95c9619929dae83a99a1dbc32f8f542869 Mon Sep 17 00:00:00 2001 From: leftgeek <1094669802@qq.com> Date: Sat, 3 Feb 2024 00:47:30 +0000 Subject: [PATCH] remove dbms scheduler job in dropping mview/mlog --- src/rootserver/ob_ddl_operator.cpp | 8 ++++---- src/storage/mview/ob_mview_sched_job_utils.cpp | 12 ++++++------ src/storage/mview/ob_mview_sched_job_utils.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/rootserver/ob_ddl_operator.cpp b/src/rootserver/ob_ddl_operator.cpp index fa4546f33..505d0ba34 100644 --- a/src/rootserver/ob_ddl_operator.cpp +++ b/src/rootserver/ob_ddl_operator.cpp @@ -4409,15 +4409,15 @@ int ObDDLOperator::drop_table( if (OB_SUCC(ret)) { const uint64_t table_id = table_schema.get_table_id(); if (table_schema.is_materialized_view()) { - if (OB_FAIL(ObMViewSchedJobUtils::disable_mview_refresh_job( + if (OB_FAIL(ObMViewSchedJobUtils::remove_mview_refresh_job( trans, tenant_id, table_id))) { - LOG_WARN("failed to disable mview refresh job", + LOG_WARN("failed to remove mview refresh job", KR(ret), K(tenant_id), K(table_id)); } } else if (table_schema.is_mlog_table()) { - if (OB_FAIL(ObMViewSchedJobUtils::disable_mlog_purge_job( + if (OB_FAIL(ObMViewSchedJobUtils::remove_mlog_purge_job( trans, tenant_id, table_id))) { - LOG_WARN("failed to disable mlog purge job", + LOG_WARN("failed to remove mlog purge job", KR(ret), K(tenant_id), K(table_id)); } } diff --git a/src/storage/mview/ob_mview_sched_job_utils.cpp b/src/storage/mview/ob_mview_sched_job_utils.cpp index 02962f706..0fa3a4105 100644 --- a/src/storage/mview/ob_mview_sched_job_utils.cpp +++ b/src/storage/mview/ob_mview_sched_job_utils.cpp @@ -258,7 +258,7 @@ int ObMViewSchedJobUtils::add_mview_info_and_refresh_job(ObISQLClient &sql_clien return ret; } -int ObMViewSchedJobUtils::disable_mview_refresh_job( +int ObMViewSchedJobUtils::remove_mview_refresh_job( ObISQLClient &sql_client, const uint64_t tenant_id, const uint64_t table_id) @@ -274,15 +274,15 @@ int ObMViewSchedJobUtils::disable_mview_refresh_job( } LOG_WARN("failed to fetch mview info", KR(ret), K(tenant_id), K(table_id)); } else if (!mview_info.get_refresh_job().empty() - && OB_FAIL(ObDBMSSchedJobUtils::disable_dbms_sched_job( + && OB_FAIL(ObDBMSSchedJobUtils::remove_dbms_sched_job( sql_client, tenant_id, mview_info.get_refresh_job(), true/*if_exists*/))) { - LOG_WARN("failed to disable dbms sched job", + LOG_WARN("failed to remove dbms sched job", KR(ret), K(tenant_id), K(mview_info.get_refresh_job())); } return ret; } -int ObMViewSchedJobUtils::disable_mlog_purge_job( +int ObMViewSchedJobUtils::remove_mlog_purge_job( ObISQLClient &sql_client, const uint64_t tenant_id, const uint64_t table_id) @@ -298,9 +298,9 @@ int ObMViewSchedJobUtils::disable_mlog_purge_job( } LOG_WARN("failed to fetch mlog info", KR(ret), K(tenant_id), K(table_id)); } else if (!mlog_info.get_purge_job().empty() - && OB_FAIL(ObDBMSSchedJobUtils::disable_dbms_sched_job( + && OB_FAIL(ObDBMSSchedJobUtils::remove_dbms_sched_job( sql_client, tenant_id, mlog_info.get_purge_job(), true/*if_exists*/))) { - LOG_WARN("failed to disable dbms sched job", + LOG_WARN("failed to remove dbms sched job", KR(ret), K(tenant_id), K(mlog_info.get_purge_job())); } return ret; diff --git a/src/storage/mview/ob_mview_sched_job_utils.h b/src/storage/mview/ob_mview_sched_job_utils.h index ddf6a201b..b62a5153b 100644 --- a/src/storage/mview/ob_mview_sched_job_utils.h +++ b/src/storage/mview/ob_mview_sched_job_utils.h @@ -80,11 +80,11 @@ public: const int64_t schema_version, share::schema::ObMViewInfo &mview_info); - static int disable_mview_refresh_job(common::ObISQLClient &sql_client, + static int remove_mview_refresh_job(common::ObISQLClient &sql_client, const uint64_t tenant_id, const uint64_t table_id); - static int disable_mlog_purge_job(common::ObISQLClient &sql_client, + static int remove_mlog_purge_job(common::ObISQLClient &sql_client, const uint64_t tenant_id, const uint64_t table_id);