fix the unprocessed state in xa rollback and rollback to sp concurrent scenarios
This commit is contained in:
		| @ -513,6 +513,7 @@ int ObSqlTransControl::start_stmt(ObExecContext &exec_ctx) | |||||||
|     OZ (txs->sql_stmt_start_hook(session->get_xid(), *session->get_tx_desc(), session->get_sessid(), get_real_session_id(*session))); |     OZ (txs->sql_stmt_start_hook(session->get_xid(), *session->get_tx_desc(), session->get_sessid(), get_real_session_id(*session))); | ||||||
|     if (OB_SUCC(ret)) { |     if (OB_SUCC(ret)) { | ||||||
|       start_hook = true; |       start_hook = true; | ||||||
|  |       OX (session->get_tx_desc()->clear_interrupt()); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   if (OB_SUCC(ret) |   if (OB_SUCC(ret) | ||||||
|  | |||||||
| @ -128,6 +128,7 @@ enum ObTxAbortCause | |||||||
|   PARTICIPANT_STATE_INCOMPLETE = 7, |   PARTICIPANT_STATE_INCOMPLETE = 7, | ||||||
|   PARTICIPANTS_SET_INCOMPLETE = 8, |   PARTICIPANTS_SET_INCOMPLETE = 8, | ||||||
|   END_STMT_FAIL = 9, |   END_STMT_FAIL = 9, | ||||||
|  |   EXPLICIT_ROLLBACK = 10, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| enum class ObTxClass { USER, SYS }; | enum class ObTxClass { USER, SYS }; | ||||||
|  | |||||||
| @ -425,6 +425,7 @@ int ObTransService::end_1pc_trans(ObTxDesc &trans_desc, | |||||||
|     ret = OB_INVALID_ARGUMENT; |     ret = OB_INVALID_ARGUMENT; | ||||||
|     TRANS_LOG(WARN, "invalid argument", K(ret), K(trans_desc)); |     TRANS_LOG(WARN, "invalid argument", K(ret), K(trans_desc)); | ||||||
|   } else if (is_rollback) { |   } else if (is_rollback) { | ||||||
|  |     interrupt(trans_desc, ObTxAbortCause::EXPLICIT_ROLLBACK); | ||||||
|     if (OB_FAIL(rollback_tx(trans_desc))) { |     if (OB_FAIL(rollback_tx(trans_desc))) { | ||||||
|       TRANS_LOG(WARN, "rollback 1pc trans fail", KR(ret)); |       TRANS_LOG(WARN, "rollback 1pc trans fail", KR(ret)); | ||||||
|     } |     } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 obdev
					obdev