Add log to solve tg_cancel_fail in mysql_connection_pool stop

This commit is contained in:
obdev
2023-05-08 08:45:16 +00:00
committed by ob-robot
parent 99e8bc8477
commit 13ac24de25
3 changed files with 16 additions and 2 deletions

View File

@ -242,7 +242,7 @@ void ObLogRestoreProxyUtil::destroy()
inited_ = false;
tenant_id_ = OB_INVALID_TENANT_ID;
connection_.stop();
TG_DESTROY(tg_id_);
destroy_tg_();
connection_.destroy();
server_prover_.destroy();
user_name_.reset();
@ -328,6 +328,7 @@ int ObLogRestoreProxyUtil::try_init(const uint64_t tenant_id,
if (OB_FAIL(ret)) {
LOG_WARN("proxy connect to primary db failed");
RESTORE_PROXY_USER_ERROR("connection");
destroy();
}
return ret;
}
@ -611,5 +612,15 @@ int ObLogRestoreProxyUtil::get_max_log_info(const ObLSID &id, palf::AccessMode &
}
return ret;
}
void ObLogRestoreProxyUtil::destroy_tg_()
{
if (-1 != tg_id_) {
int origin_tg_id = tg_id_;
TG_DESTROY(tg_id_);
tg_id_ = -1;
LOG_INFO("destroy_tg_ succ", K(origin_tg_id));
}
}
} // namespace share
} // namespace oceanbase