add destroy thread gracefully

This commit is contained in:
zhjc1124
2023-06-08 07:42:27 +00:00
committed by ob-robot
parent 340151ccc9
commit f4b390d643
25 changed files with 203 additions and 39 deletions

View File

@ -1270,6 +1270,8 @@ int ObRootService::stop()
FLOG_INFO("dbms sched job master stop");
TG_STOP(lib::TGDefIDs::GlobalCtxTimer);
FLOG_INFO("global ctx timer stop");
archive_service_.stop();
FLOG_INFO("archive service stop");
}
}
@ -1314,6 +1316,8 @@ void ObRootService::wait()
FLOG_INFO("rebalance task mgr exit success");
TG_WAIT(lib::TGDefIDs::GlobalCtxTimer);
FLOG_INFO("global ctx timer exit success");
archive_service_.wait();
FLOG_INFO("archive service exit success");
backup_task_scheduler_.reuse();
ObUpdateRsListTask::clear_lock();
THE_RS_JOB_TABLE.reset_max_job_id();
@ -5064,6 +5068,12 @@ int ObRootService::do_restart()
FLOG_INFO("success to start backup_lease_service_");
}
if (FAILEDx(archive_service_.start())) {
FLOG_WARN("archive service start failed", KR(ret));
} else {
FLOG_INFO("success to start archive service");
}
if (FAILEDx(disaster_recovery_task_mgr_.start())) {
FLOG_WARN("disaster recovery task manager start failed", KR(ret));