fix dag scheduler destroy when init failed

This commit is contained in:
a1iive
2023-09-12 02:40:35 +00:00
committed by ob-robot
parent 45573c67e5
commit ffd6829b5b
9 changed files with 144 additions and 111 deletions

View File

@ -269,19 +269,23 @@ void ObTableStoreStatMgr::wait()
}
void ObTableStoreStatMgr::destroy()
{
if(is_inited_){
is_inited_ = false;
TG_DESTROY(lib::TGDefIDs::TableStatRpt);
report_task_.destroy();
report_cursor_ = 0;
pending_cursor_ = 0;
lru_head_ = NULL;
lru_tail_ = NULL;
cur_cnt_ = 0;
limit_cnt_ = 0;
quick_map_.destroy();
if (IS_INIT) {
reset();
}
}
void ObTableStoreStatMgr::reset()
{
is_inited_ = false;
TG_DESTROY(lib::TGDefIDs::TableStatRpt);
report_task_.destroy();
report_cursor_ = 0;
pending_cursor_ = 0;
lru_head_ = NULL;
lru_tail_ = NULL;
cur_cnt_ = 0;
limit_cnt_ = 0;
quick_map_.destroy();
}
int ObTableStoreStatMgr::init(const int64_t limit_cnt)
{
@ -317,6 +321,9 @@ int ObTableStoreStatMgr::init(const int64_t limit_cnt)
is_inited_ = true;
}
}
if (!is_inited_) {
reset();
}
return ret;
}