remove dbms scheduler job in dropping mview/mlog

This commit is contained in:
leftgeek 2024-02-03 00:47:30 +00:00 committed by ob-robot
parent d91af78d34
commit dcf84f95c9
3 changed files with 12 additions and 12 deletions

View File

@ -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));
}
}

View File

@ -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;

View File

@ -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);