diff --git a/src/storage/tx/ob_tx_2pc_msg_handler.cpp b/src/storage/tx/ob_tx_2pc_msg_handler.cpp index 2a4e8deb51507355c37c81245b298aea48fb151e..6d6a66c049d80fdc6ff8d238331df631005e1709 100644 --- a/src/storage/tx/ob_tx_2pc_msg_handler.cpp +++ b/src/storage/tx/ob_tx_2pc_msg_handler.cpp @@ -634,7 +634,17 @@ int ObPartTransCtx::handle_tx_2pc_prepare_resp(const Ob2pcPrepareRespMsg &msg) if (OB_FAIL(set_2pc_request_id_(msg.request_id_))) { TRANS_LOG(WARN, "set request id failed", KR(ret), K(msg), K(*this)); } else if (OB_FAIL(find_participant_id_(msg.sender_, participant_id))) { - TRANS_LOG(ERROR, "find participant failed", KR(ret), K(msg), K(*this)); + if (0 == exec_info_.participants_.count()) { + // It may be possible that when the coordinator switches to the new + // leader, compensates the abort log while it may have already broadcasted + // the prepare requests by the old leader. And during the paxos of the + // abort log, it may receive the prepare response and has no participants + // list to handle the response, so we need tolerate it here. + ret = OB_SUCCESS; + TRANS_LOG(INFO, "find participant failed", KR(ret), K(msg), K(*this)); + } else { + TRANS_LOG(ERROR, "find participant failed", KR(ret), K(msg), K(*this)); + } } else if (OB_FAIL(handle_2pc_resp(msg_type, participant_id))) { TRANS_LOG(WARN, "handle 2pc response failed", KR(ret), K(msg), K(participant_id), K(*this)); }