destroy thread for kill 15
This commit is contained in:
@ -475,6 +475,26 @@ void ObServer::destroy()
|
|||||||
FLOG_INFO("[OBSERVER_NOTICE] destroy observer begin");
|
FLOG_INFO("[OBSERVER_NOTICE] destroy observer begin");
|
||||||
if (is_arbitration_mode()) {
|
if (is_arbitration_mode()) {
|
||||||
} else if (!has_destroy_ && has_stopped_) {
|
} else if (!has_destroy_ && has_stopped_) {
|
||||||
|
FLOG_INFO("begin destroy signal worker");
|
||||||
|
sig_worker_->destroy();
|
||||||
|
FLOG_INFO("signal worker destroyed");
|
||||||
|
|
||||||
|
FLOG_INFO("begin destroy signal handle");
|
||||||
|
signal_handle_->destroy();
|
||||||
|
FLOG_INFO("signal handle destroyed");
|
||||||
|
|
||||||
|
FLOG_INFO("begin to destroy ObLogger");
|
||||||
|
OB_LOGGER.destroy();
|
||||||
|
FLOG_INFO("ObLogger destroyed");
|
||||||
|
|
||||||
|
FLOG_INFO("active session history task destroyed");
|
||||||
|
ObClockGenerator::destroy();
|
||||||
|
FLOG_INFO("clock generator destroyed");
|
||||||
|
|
||||||
|
FLOG_INFO("opt stat manager destroyed");
|
||||||
|
ObOptStatManager::get_instance().destroy();
|
||||||
|
FLOG_INFO("opt stat manager destroyed");
|
||||||
|
|
||||||
FLOG_INFO("begin to destroy active session history task");
|
FLOG_INFO("begin to destroy active session history task");
|
||||||
ObActiveSessHistTask::get_instance().destroy();
|
ObActiveSessHistTask::get_instance().destroy();
|
||||||
FLOG_INFO("active session history task destroyed");
|
FLOG_INFO("active session history task destroyed");
|
||||||
@ -985,6 +1005,14 @@ int ObServer::stop()
|
|||||||
FLOG_INFO("end to stop imc tasks", KR(ret));
|
FLOG_INFO("end to stop imc tasks", KR(ret));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
FLOG_INFO("begin stop signal worker");
|
||||||
|
sig_worker_->stop();
|
||||||
|
FLOG_INFO("stop signal worker success");
|
||||||
|
|
||||||
|
FLOG_INFO("begin stop signal handle");
|
||||||
|
signal_handle_->stop();
|
||||||
|
FLOG_INFO("stop signal handle success");
|
||||||
|
|
||||||
FLOG_INFO("begin to stop server blacklist");
|
FLOG_INFO("begin to stop server blacklist");
|
||||||
TG_STOP(lib::TGDefIDs::Blacklist);
|
TG_STOP(lib::TGDefIDs::Blacklist);
|
||||||
FLOG_INFO("server blacklist stopped");
|
FLOG_INFO("server blacklist stopped");
|
||||||
@ -1121,10 +1149,17 @@ int ObServer::stop()
|
|||||||
bl_service_.stop();
|
bl_service_.stop();
|
||||||
FLOG_INFO("blacklist service stopped");
|
FLOG_INFO("blacklist service stopped");
|
||||||
|
|
||||||
|
FLOG_INFO("begin to stop tenant timezone manager");
|
||||||
|
tenant_timezone_mgr_.stop();
|
||||||
|
FLOG_INFO("tenant timezone manager stopped");
|
||||||
//FLOG_INFO("begin stop partition scheduler");
|
//FLOG_INFO("begin stop partition scheduler");
|
||||||
//ObPartitionScheduler::get_instance().stop_merge();
|
//ObPartitionScheduler::get_instance().stop_merge();
|
||||||
//FLOG_INFO("partition scheduler stopped", KR(ret));
|
//FLOG_INFO("partition scheduler stopped", KR(ret));
|
||||||
|
|
||||||
|
FLOG_INFO("begin to stop opt stat manager ");
|
||||||
|
ObOptStatManager::get_instance().stop();
|
||||||
|
FLOG_INFO("opt stat manager stopped");
|
||||||
|
|
||||||
FLOG_INFO("begin to stop server checkpoint slog handler");
|
FLOG_INFO("begin to stop server checkpoint slog handler");
|
||||||
ObServerCheckpointSlogHandler::get_instance().stop();
|
ObServerCheckpointSlogHandler::get_instance().stop();
|
||||||
FLOG_INFO("server checkpoint slog handler stopped");
|
FLOG_INFO("server checkpoint slog handler stopped");
|
||||||
@ -1234,6 +1269,15 @@ int ObServer::wait()
|
|||||||
|
|
||||||
if (is_arbitration_mode()) {
|
if (is_arbitration_mode()) {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
FLOG_INFO("begin wait signal worker");
|
||||||
|
sig_worker_->wait();
|
||||||
|
FLOG_INFO("wait signal worker success");
|
||||||
|
|
||||||
|
FLOG_INFO("begin wait signal handle");
|
||||||
|
signal_handle_->wait();
|
||||||
|
FLOG_INFO("wait signal handle success");
|
||||||
|
|
||||||
FLOG_INFO("begin to wait active session hist task");
|
FLOG_INFO("begin to wait active session hist task");
|
||||||
ObActiveSessHistTask::get_instance().wait();
|
ObActiveSessHistTask::get_instance().wait();
|
||||||
FLOG_INFO("wait active session hist task success");
|
FLOG_INFO("wait active session hist task success");
|
||||||
@ -1376,6 +1420,14 @@ int ObServer::wait()
|
|||||||
bl_service_.wait();
|
bl_service_.wait();
|
||||||
FLOG_INFO("wait blacklist service success");
|
FLOG_INFO("wait blacklist service success");
|
||||||
|
|
||||||
|
FLOG_INFO("begin to wait tenant timezone manager");
|
||||||
|
tenant_timezone_mgr_.wait();
|
||||||
|
FLOG_INFO("wait tenant timezone manager success");
|
||||||
|
|
||||||
|
FLOG_INFO("begin to wait opt stat manager");
|
||||||
|
ObOptStatManager::get_instance().wait();
|
||||||
|
FLOG_INFO("wait opt stat manager success");
|
||||||
|
|
||||||
FLOG_INFO("begin to wait server checkpoint slog handler");
|
FLOG_INFO("begin to wait server checkpoint slog handler");
|
||||||
ObServerCheckpointSlogHandler::get_instance().wait();
|
ObServerCheckpointSlogHandler::get_instance().wait();
|
||||||
FLOG_INFO("wait server checkpoint slog handler success");
|
FLOG_INFO("wait server checkpoint slog handler success");
|
||||||
|
|||||||
@ -105,7 +105,6 @@ ObTenantTimezoneMgr::ObTenantTimezoneMgr()
|
|||||||
|
|
||||||
ObTenantTimezoneMgr::~ObTenantTimezoneMgr()
|
ObTenantTimezoneMgr::~ObTenantTimezoneMgr()
|
||||||
{
|
{
|
||||||
TG_DESTROY(lib::TGDefIDs::TIMEZONE_MGR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ObTenantTimezoneMgr &ObTenantTimezoneMgr::get_instance()
|
ObTenantTimezoneMgr &ObTenantTimezoneMgr::get_instance()
|
||||||
@ -149,8 +148,19 @@ void ObTenantTimezoneMgr::init(tenant_timezone_map_getter tz_map_getter)
|
|||||||
is_inited_ = true;
|
is_inited_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObTenantTimezoneMgr::stop()
|
||||||
|
{
|
||||||
|
TG_STOP(lib::TGDefIDs::TIMEZONE_MGR);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObTenantTimezoneMgr::wait()
|
||||||
|
{
|
||||||
|
TG_WAIT(lib::TGDefIDs::TIMEZONE_MGR);
|
||||||
|
}
|
||||||
|
|
||||||
void ObTenantTimezoneMgr::destroy()
|
void ObTenantTimezoneMgr::destroy()
|
||||||
{
|
{
|
||||||
|
TG_DESTROY(lib::TGDefIDs::TIMEZONE_MGR);
|
||||||
timezone_map_.destroy();
|
timezone_map_.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -137,6 +137,9 @@ public:
|
|||||||
void set_start_refresh(bool start) { start_refresh_ = start; }
|
void set_start_refresh(bool start) { start_refresh_ = start; }
|
||||||
bool is_usable() { return usable_; }
|
bool is_usable() { return usable_; }
|
||||||
void set_usable() { usable_ = true; }
|
void set_usable() { usable_ = true; }
|
||||||
|
|
||||||
|
void stop();
|
||||||
|
void wait();
|
||||||
void destroy();
|
void destroy();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -73,6 +73,21 @@ int ObConfigManager::init(ObMySQLProxy &sql_proxy, const ObAddr &server)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObConfigManager::stop()
|
||||||
|
{
|
||||||
|
TG_STOP(lib::TGDefIDs::CONFIG_MGR);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObConfigManager::wait()
|
||||||
|
{
|
||||||
|
TG_WAIT(lib::TGDefIDs::CONFIG_MGR);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObConfigManager::destroy()
|
||||||
|
{
|
||||||
|
TG_DESTROY(lib::TGDefIDs::CONFIG_MGR);
|
||||||
|
}
|
||||||
|
|
||||||
int ObConfigManager::reload_config()
|
int ObConfigManager::reload_config()
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
|
|||||||
@ -44,6 +44,9 @@ public:
|
|||||||
|
|
||||||
int init(const ObAddr &server);
|
int init(const ObAddr &server);
|
||||||
int init(ObMySQLProxy &sql_proxy, const ObAddr &server);
|
int init(ObMySQLProxy &sql_proxy, const ObAddr &server);
|
||||||
|
void stop();
|
||||||
|
void wait();
|
||||||
|
void destroy();
|
||||||
|
|
||||||
int check_header_change(const char* path, const char* buf) const;
|
int check_header_change(const char* path, const char* buf) const;
|
||||||
// manual dump to file named by path
|
// manual dump to file named by path
|
||||||
|
|||||||
@ -319,12 +319,14 @@ void ObLocationService::stop()
|
|||||||
{
|
{
|
||||||
ls_location_service_.stop();
|
ls_location_service_.stop();
|
||||||
tablet_ls_service_.stop();
|
tablet_ls_service_.stop();
|
||||||
|
vtable_location_service_.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObLocationService::wait()
|
void ObLocationService::wait()
|
||||||
{
|
{
|
||||||
ls_location_service_.wait();
|
ls_location_service_.wait();
|
||||||
tablet_ls_service_.wait();
|
tablet_ls_service_.wait();
|
||||||
|
vtable_location_service_.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObLocationService::destroy()
|
int ObLocationService::destroy()
|
||||||
@ -334,6 +336,8 @@ int ObLocationService::destroy()
|
|||||||
LOG_WARN("destroy ls_location_service failed", KR(ret));
|
LOG_WARN("destroy ls_location_service failed", KR(ret));
|
||||||
} else if (OB_FAIL(tablet_ls_service_.destroy())) {
|
} else if (OB_FAIL(tablet_ls_service_.destroy())) {
|
||||||
LOG_WARN("destroy tablet_ls_service failed", KR(ret));
|
LOG_WARN("destroy tablet_ls_service failed", KR(ret));
|
||||||
|
} else if(OB_FAIL(vtable_location_service_.destroy())){
|
||||||
|
LOG_WARN("destroy vtable_location_service failed", KR(ret));
|
||||||
} else {
|
} else {
|
||||||
stopped_ = true;
|
stopped_ = true;
|
||||||
inited_ = false;
|
inited_ = false;
|
||||||
|
|||||||
@ -90,6 +90,23 @@ int ObVTableLocationService::init(
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObVTableLocationService::stop()
|
||||||
|
{
|
||||||
|
update_queue_.stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObVTableLocationService::wait()
|
||||||
|
{
|
||||||
|
update_queue_.wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
int ObVTableLocationService::destroy()
|
||||||
|
{
|
||||||
|
int ret = OB_SUCCESS;
|
||||||
|
update_queue_.destroy();
|
||||||
|
vtable_cache_.destroy();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
//TODO: 1.remove ObPartitionLocation 2.add auto renew 3.cached by tenant_id
|
//TODO: 1.remove ObPartitionLocation 2.add auto renew 3.cached by tenant_id
|
||||||
int ObVTableLocationService::vtable_get(
|
int ObVTableLocationService::vtable_get(
|
||||||
const uint64_t tenant_id,
|
const uint64_t tenant_id,
|
||||||
|
|||||||
@ -77,6 +77,9 @@ public:
|
|||||||
ObIAliveServerTracer &server_tracer,
|
ObIAliveServerTracer &server_tracer,
|
||||||
ObRsMgr &rs_mgr,
|
ObRsMgr &rs_mgr,
|
||||||
obrpc::ObCommonRpcProxy &rpc_proxy);
|
obrpc::ObCommonRpcProxy &rpc_proxy);
|
||||||
|
void stop();
|
||||||
|
void wait();
|
||||||
|
int destroy();
|
||||||
int vtable_get(
|
int vtable_get(
|
||||||
const uint64_t tenant_id,
|
const uint64_t tenant_id,
|
||||||
const uint64_t table_id,
|
const uint64_t table_id,
|
||||||
|
|||||||
@ -91,6 +91,21 @@ int ObOptStatManager::init(ObMySQLProxy *proxy,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObOptStatManager::stop()
|
||||||
|
{
|
||||||
|
refresh_stat_task_queue_.stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObOptStatManager::wait()
|
||||||
|
{
|
||||||
|
refresh_stat_task_queue_.wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObOptStatManager::destroy()
|
||||||
|
{
|
||||||
|
refresh_stat_task_queue_.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
int ObOptStatManager::add_refresh_stat_task(const obrpc::ObUpdateStatCacheArg &analyze_arg)
|
int ObOptStatManager::add_refresh_stat_task(const obrpc::ObUpdateStatCacheArg &analyze_arg)
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
|
|||||||
@ -35,7 +35,9 @@ public:
|
|||||||
virtual ~ObOptStatManager() {}
|
virtual ~ObOptStatManager() {}
|
||||||
virtual int init(ObMySQLProxy *proxy,
|
virtual int init(ObMySQLProxy *proxy,
|
||||||
ObServerConfig *config);
|
ObServerConfig *config);
|
||||||
|
virtual void stop();
|
||||||
|
virtual void wait();
|
||||||
|
virtual void destroy();
|
||||||
static int64_t get_default_data_size();
|
static int64_t get_default_data_size();
|
||||||
|
|
||||||
static int64_t get_default_avg_row_size();
|
static int64_t get_default_avg_row_size();
|
||||||
|
|||||||
@ -53,6 +53,7 @@ void ObLocalityManager::destroy()
|
|||||||
TG_DESTROY(lib::TGDefIDs::LocalityReload);
|
TG_DESTROY(lib::TGDefIDs::LocalityReload);
|
||||||
locality_info_.destroy();
|
locality_info_.destroy();
|
||||||
server_locality_cache_.destroy();
|
server_locality_cache_.destroy();
|
||||||
|
refresh_locality_task_queue_.destroy();
|
||||||
STORAGE_LOG(INFO, "ObLocalityManager destroy finished");
|
STORAGE_LOG(INFO, "ObLocalityManager destroy finished");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user