change the log level to WARN when stream rpc has not been processed yet and receive abort packet

This commit is contained in:
496148326@qq.com
2024-01-15 13:47:31 +00:00
committed by ob-robot
parent b3ec417991
commit b2c81fc587
2 changed files with 9 additions and 3 deletions

View File

@ -578,7 +578,9 @@ int ObRpcProcessorBase::flush(int64_t wait_timeout)
req_ = NULL; //wait fail, invalid req_ req_ = NULL; //wait fail, invalid req_
reuse(); reuse();
is_stream_end_ = true; is_stream_end_ = true;
RPC_OBRPC_LOG(WARN, "wait next packet fail, set req_ to null", K(ret), K(wait_timeout)); int pcode = m_get_pcode();
RPC_OBRPC_LOG(WARN, "wait next packet fail, set req_ to null", K(ret),
K(pcode), K(wait_timeout));
} else if (OB_ISNULL(req)) { } else if (OB_ISNULL(req)) {
ret = OB_ERR_UNEXPECTED; ret = OB_ERR_UNEXPECTED;
RPC_OBRPC_LOG(ERROR, "Req should not be NULL", K(ret)); RPC_OBRPC_LOG(ERROR, "Req should not be NULL", K(ret));

View File

@ -64,8 +64,12 @@ bool ObRpcSessionHandler::wakeup_next_thread(ObRequest &req)
LOG_WARN_RET(hash_ret, "wakeup session but no thread wait", K(req)); LOG_WARN_RET(hash_ret, "wakeup session but no thread wait", K(req));
bret = false; bret = false;
} else if (NULL != wait_object.req_) { } else if (NULL != wait_object.req_) {
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "previous stream request hasn't processed", const ObRpcPacket &pkt = reinterpret_cast<const ObRpcPacket&>(req.get_packet());
"request", *wait_object.req_); ObRpcPacketCode pcode = pkt.get_pcode();
bool is_stream_last = pkt.is_stream_last();
LOG_WARN_RET(OB_ERR_UNEXPECTED, "previous stream request hasn't been processed yet, "
"this might be an abort packet that indicates execution has timed out",
K(pcode), K(is_stream_last), "previous request", *wait_object.req_);
bret = false; bret = false;
} else { } else {
// set packet to wait object // set packet to wait object