[master] tx_desc used by px_worker relese without lock protected

This commit is contained in:
chinaxing
2023-07-17 13:12:20 +00:00
committed by ob-robot
parent a1d13b8c78
commit b3db035771
8 changed files with 20 additions and 6 deletions

View File

@ -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();