fix kill 15 issues

This commit is contained in:
zhjc1124
2023-05-11 08:52:56 +00:00
committed by ob-robot
parent 635cd39eda
commit 95dc4939b6
5 changed files with 17 additions and 0 deletions

View File

@ -746,6 +746,9 @@ public:
while (cur != head) { while (cur != head) {
ObSqlSock* s = CONTAINER_OF(cur, ObSqlSock, all_list_link_); ObSqlSock* s = CONTAINER_OF(cur, ObSqlSock, all_list_link_);
cur = cur->next_; cur = cur->next_;
s->on_disconnect();
ObSqlSockSession *sess = (ObSqlSockSession *)s->sess_;
sess->destroy();
s->do_close(); s->do_close();
} }
} }

View File

@ -531,6 +531,10 @@ void ObServer::destroy()
ob_service_.destroy(); ob_service_.destroy();
FLOG_INFO("ob service destroyed"); FLOG_INFO("ob service destroyed");
FLOG_INFO("begin to destroy session manager");
session_mgr_.destroy();
FLOG_INFO("session manager destroyed");
FLOG_INFO("begin to destroy locality manager"); FLOG_INFO("begin to destroy locality manager");
locality_manager_.destroy(); locality_manager_.destroy();
FLOG_INFO("locality manager destroyed"); FLOG_INFO("locality manager destroyed");

View File

@ -251,6 +251,8 @@ int ObTabletLSService::destroy()
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
stopped_ = true; stopped_ = true;
inited_ = false; inited_ = false;
inner_cache_.destroy();
async_queue_.destroy();
return ret; return ret;
} }

View File

@ -286,6 +286,13 @@ int ObSQLSessionMgr::init()
return ret; return ret;
} }
void ObSQLSessionMgr::destroy()
{
sessinfo_map_.destroy();
sessid_sequence_.destroy();
sess_hold_map_.destroy();
}
uint64_t ObSQLSessionMgr::extract_server_id(uint32_t sessid) uint64_t ObSQLSessionMgr::extract_server_id(uint32_t sessid)
{ {
uint64_t server_id = sessid >> LOCAL_SEQ_LEN; uint64_t server_id = sessid >> LOCAL_SEQ_LEN;

View File

@ -72,6 +72,7 @@ public:
* @param conn : connection information * @param conn : connection information
* @param sess_info : point to the ObSQLSessionInfo that the function created; used as value * @param sess_info : point to the ObSQLSessionInfo that the function created; used as value
*/ */
void destroy();
int create_session(observer::ObSMConnection *conn, ObSQLSessionInfo *&sess_info); int create_session(observer::ObSMConnection *conn, ObSQLSessionInfo *&sess_info);
// create session by session id and proxy session id. // create session by session id and proxy session id.
// need call revert_session if return success. // need call revert_session if return success.