[master] add session id into autocommit log

This commit is contained in:
chinaxing
2023-02-16 13:12:15 +00:00
committed by ob-robot
parent e27bec92d2
commit 88ee461fbe
4 changed files with 8 additions and 3 deletions

View File

@ -935,8 +935,8 @@ int ObVariableSetExecutor::process_session_autocommit_hook(ObExecContext &exec_c
// 其它只影响AC标志位,但无需做commit操作
}
}
LOG_INFO("set var: autocommit", K(ret), K(orig_ac), "to", autocommit, K(my_session->get_sessid()));
}
LOG_INFO("set var: autocommit", K(ret), K(orig_ac), "to", autocommit);
return ret;
}

View File

@ -3534,6 +3534,8 @@ int ObBasicSessionInfo::replace_new_session_label(uint64_t policy_id, const ObLa
int64_t ObBasicSessionInfo::to_string(char *buf, const int64_t buf_len) const
{
int64_t pos = 0;
bool ac = false;
get_autocommit(ac),
J_OBJ_START();
J_KV(KP(this), "id", sessid_,
N_TENANT, get_tenant_name(), "tenant_id", tenant_id_,
@ -3542,6 +3544,7 @@ int64_t ObBasicSessionInfo::to_string(char *buf, const int64_t buf_len) const
N_USER, (lib::is_oracle_mode() ? get_user_name() : get_user_at_host()),
"consistency_level", consistency_level_,
"session_state", thread_data_.state_,
"autocommit", ac,
"tx", OB_P(tx_desc_));
J_OBJ_END();
return pos;

View File

@ -346,11 +346,11 @@ void ObSQLSessionInfo::reset(bool skip_sys_var)
optimizer_tracer_.reset();
sql_plan_manager_ = NULL;
destroy_session_plan_mgr();
txn_free_route_ctx_.reset();
expect_group_id_ = OB_INVALID_ID;
group_id_not_expected_ = false;
//call at last time
ObBasicSessionInfo::reset(skip_sys_var);
txn_free_route_ctx_.reset();
}
}