fix dag scheduler destroy when init failed
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user