[BUG] add row latch when log sync failed

This commit is contained in:
obdev
2023-01-28 17:00:18 +08:00
committed by ob-robot
parent da8c498599
commit 06b882fa75
7 changed files with 33 additions and 3 deletions

View File

@ -898,6 +898,10 @@ int ObServer::stop()
FLOG_INFO("mysql shutdown network stopped");
}
FLOG_INFO("begin to sql nio stop");
net_frame_.sql_nio_stop();
FLOG_INFO("sql nio stopped");
FLOG_INFO("begin to stop active session history task");
ObActiveSessHistTask::get_instance().stop();
FLOG_INFO("active session history task stopped");

View File

@ -453,9 +453,6 @@ int ObSrvNetworkFrame::stop()
if (OB_FAIL(net_.stop())) {
LOG_WARN("stop easy net fail", K(ret));
}
if (NULL != obmysql::global_sql_nio_server) {
obmysql::global_sql_nio_server->stop();
}
return ret;
}
@ -489,3 +486,10 @@ void ObSrvNetworkFrame::set_ratelimit_enable(int ratelimit_enabled)
rpc_transport_->set_ratelimit_enable(ratelimit_enabled);
batch_rpc_transport_->set_ratelimit_enable(ratelimit_enabled);
}
void ObSrvNetworkFrame::sql_nio_stop()
{
if (NULL != obmysql::global_sql_nio_server) {
obmysql::global_sql_nio_server->stop();
}
}

View File

@ -49,6 +49,7 @@ public:
int high_prio_rpc_shutdown();
int batch_rpc_shutdown();
int unix_rpc_shutdown();
void sql_nio_stop();
void wait();
int stop();

View File

@ -1204,6 +1204,8 @@ int ObMvccRowCallback::log_sync_fail()
{
int ret = OB_SUCCESS;
ObRowLatchGuard guard(value_.latch_);
if (OB_FAIL(dec_unsynced_cnt_())) {
TRANS_LOG(ERROR, "memtable dec unsynced cnt error", K(ret),
K(memtable_->get_unsynced_cnt()));