[master] tx_desc used by px_worker relese without lock protected
This commit is contained in:
@ -467,6 +467,7 @@ int ObPxSQCProxy::report(int end_ret) const
|
||||
(void)MTL(transaction::ObTransService*)->merge_tx_state(*sqc_tx_desc, *task_tx_desc);
|
||||
(void)MTL(transaction::ObTransService*)->release_tx(*task_tx_desc);
|
||||
} else {
|
||||
sql::ObSQLSessionInfo::LockGuard guard(session->get_thread_data_lock());
|
||||
sqc_tx_desc = task_tx_desc;
|
||||
}
|
||||
task_tx_desc = NULL;
|
||||
|
||||
@ -544,6 +544,8 @@ int ObPxTaskProcess::record_tx_desc()
|
||||
CK (OB_NOT_NULL(cur_exec_ctx = arg_.exec_ctx_));
|
||||
CK (OB_NOT_NULL(cur_session = cur_exec_ctx->get_my_session()));
|
||||
if (OB_SUCC(ret) && !arg_.sqc_task_ptr_->is_use_local_thread()) {
|
||||
// move session's tx_desc to task, accumulate when sqc report
|
||||
ObSQLSessionInfo::LockGuard guard(cur_session->get_thread_data_lock());
|
||||
transaction::ObTxDesc *&cur_tx_desc = cur_session->get_tx_desc();
|
||||
if (OB_NOT_NULL(cur_tx_desc)) {
|
||||
transaction::ObTxDesc *&task_tx_desc = arg_.sqc_task_ptr_->get_tx_desc();
|
||||
|
||||
Reference in New Issue
Block a user