[CP] fix change user and quit not send disconnect
This commit is contained in:
@ -254,6 +254,7 @@ int ObMPChangeUser::process()
|
|||||||
if (OB_FAIL(send_error_packet(ret, NULL))) {
|
if (OB_FAIL(send_error_packet(ret, NULL))) {
|
||||||
OB_LOG(WARN,"response fail packet fail", K(ret));
|
OB_LOG(WARN,"response fail packet fail", K(ret));
|
||||||
}
|
}
|
||||||
|
need_disconnect = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OB_UNLIKELY(need_disconnect) && is_conn_valid()) {
|
if (OB_UNLIKELY(need_disconnect) && is_conn_valid()) {
|
||||||
|
@ -52,6 +52,7 @@ int ObMPQuit::process()
|
|||||||
if (NULL != session) {
|
if (NULL != session) {
|
||||||
revert_session(session);
|
revert_session(session);
|
||||||
}
|
}
|
||||||
|
disconnect();
|
||||||
SERVER_LOG(INFO, "quit");
|
SERVER_LOG(INFO, "quit");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,6 @@ int ObMPStatistic::process()
|
|||||||
LOG_WARN("failed to alloc easy buf", K(ret));
|
LOG_WARN("failed to alloc easy buf", K(ret));
|
||||||
} else if (OB_FAIL(packet_sender_.update_last_pkt_pos())) {
|
} else if (OB_FAIL(packet_sender_.update_last_pkt_pos())) {
|
||||||
LOG_WARN("failed to update last packet pos", K(ret));
|
LOG_WARN("failed to update last packet pos", K(ret));
|
||||||
} else if (OB_FAIL(response_packet(pkt, NULL))) {
|
|
||||||
RPC_OBMYSQL_LOG(WARN, "fail to response statistic packet", K(ret));
|
|
||||||
} else if (OB_ISNULL(conn = get_conn())) {
|
} else if (OB_ISNULL(conn = get_conn())) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
LOG_WARN("get connection fail", K(conn), K(ret));
|
LOG_WARN("get connection fail", K(conn), K(ret));
|
||||||
@ -62,14 +60,19 @@ int ObMPStatistic::process()
|
|||||||
LOG_WARN("update transmisson checksum flag failed", K(ret));
|
LOG_WARN("update transmisson checksum flag failed", K(ret));
|
||||||
} else {
|
} else {
|
||||||
ObOKPParam ok_param; // use default values
|
ObOKPParam ok_param; // use default values
|
||||||
if (OB_FAIL(send_ok_packet(*session, ok_param))) {
|
if (OB_FAIL(send_ok_packet(*session, ok_param, &pkt))) {
|
||||||
LOG_WARN("fail to send ok pakcet in statistic response", K(ok_param), K(ret));
|
LOG_WARN("fail to send ok pakcet in statistic response", K(ok_param), K(ret));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (OB_LIKELY(NULL != session)) {
|
if (OB_LIKELY(NULL != session)) {
|
||||||
revert_session(session);
|
revert_session(session);
|
||||||
}
|
}
|
||||||
|
} else if (OB_FAIL(response_packet(pkt, NULL))) {
|
||||||
|
RPC_OBMYSQL_LOG(WARN, "fail to response statistic packet", K(ret));
|
||||||
|
} else {
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OB_FAIL(ret) && need_response_error) {
|
if (OB_FAIL(ret) && need_response_error) {
|
||||||
send_error_packet(ret, NULL);
|
send_error_packet(ret, NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user