fix print trans trace event core
This commit is contained in:
parent
73394d9ef0
commit
b9e9df19bf
2
deps/oblib/src/lib/trace/ob_trace_event.h
vendored
2
deps/oblib/src/lib/trace/ob_trace_event.h
vendored
@ -62,7 +62,7 @@ public:
|
||||
int64_t total_time = 0;
|
||||
const char* event_name = NULL;
|
||||
const ObString nls_format;
|
||||
for (int64_t i = 0; i < this->next_idx_; ++i) {
|
||||
for (int64_t i = 0; i < MIN(EVENT_COUNT, this->next_idx_); ++i) {
|
||||
const ObTraceEvent &ev = this->events_[i];
|
||||
event_name = NAME(ev.id_);
|
||||
if (prev_ts == 0) {
|
||||
|
@ -7636,9 +7636,11 @@ int ObPartTransCtx::start_access(const ObTxDesc &tx_desc, ObTxSEQ &data_scn, con
|
||||
}
|
||||
last_request_ts_ = ObClockGenerator::getClock();
|
||||
TRANS_LOG(TRACE, "start_access", K(ret), K(data_scn.support_branch()), K(data_scn), KPC(this));
|
||||
common::ObTraceIdAdaptor trace_id;
|
||||
trace_id.set(ObCurTraceId::get());
|
||||
REC_TRANS_TRACE_EXT(tlog_, start_access,
|
||||
OB_ID(ret), ret,
|
||||
OB_ID(trace_id), *ObCurTraceId::get(),
|
||||
OB_ID(trace_id), trace_id,
|
||||
OB_ID(opid), tx_desc.op_sn_,
|
||||
OB_ID(data_seq), data_scn.cast_to_int(),
|
||||
OB_ID(pending), pending_write,
|
||||
|
@ -648,6 +648,8 @@ int ObTransService::get_read_snapshot(ObTxDesc &tx,
|
||||
snapshot.valid_ = true;
|
||||
}
|
||||
ObTransTraceLog &tlog = tx.get_tlog();
|
||||
common::ObTraceIdAdaptor trace_id;
|
||||
trace_id.set(ObCurTraceId::get());
|
||||
REC_TRANS_TRACE_EXT(&tlog, get_read_snapshot, OB_Y(ret), OB_Y(expire_ts),
|
||||
OB_ID(txid), tx.tx_id_,
|
||||
OB_ID(isolation_level), (int)isolation,
|
||||
@ -655,7 +657,7 @@ int ObTransService::get_read_snapshot(ObTxDesc &tx,
|
||||
OB_ID(snapshot_version), snapshot.core_.version_,
|
||||
OB_ID(snapshot_txid), snapshot.core_.tx_id_.get_id(),
|
||||
OB_ID(snapshot_scn), snapshot.core_.scn_.cast_to_int(),
|
||||
OB_ID(trace_id), ObCurTraceId::get_trace_id_str(),
|
||||
OB_ID(trace_id), trace_id,
|
||||
OB_ID(ref), tx.get_ref(),
|
||||
OB_ID(thread_id), GETTID());
|
||||
return ret;
|
||||
@ -718,6 +720,8 @@ int ObTransService::get_ls_read_snapshot(ObTxDesc &tx,
|
||||
ret = get_read_snapshot(tx, isolation, expire_ts, snapshot);
|
||||
}
|
||||
ObTransTraceLog &tlog = tx.get_tlog();
|
||||
common::ObTraceIdAdaptor trace_id;
|
||||
trace_id.set(ObCurTraceId::get());
|
||||
REC_TRANS_TRACE_EXT(&tlog, get_ls_read_snapshot, OB_Y(ret), OB_Y(expire_ts),
|
||||
OB_ID(ls_id), lsid.id(),
|
||||
OB_ID(isolation_level), (int)isolation,
|
||||
@ -725,7 +729,7 @@ int ObTransService::get_ls_read_snapshot(ObTxDesc &tx,
|
||||
OB_ID(snapshot_version), snapshot.core_.version_,
|
||||
OB_ID(snapshot_txid), snapshot.core_.tx_id_.get_id(),
|
||||
OB_ID(snapshot_scn), snapshot.core_.scn_.cast_to_int(),
|
||||
OB_ID(trace_id), ObCurTraceId::get_trace_id_str(),
|
||||
OB_ID(trace_id), trace_id,
|
||||
OB_ID(ref), tx.get_ref(),
|
||||
OB_ID(thread_id), GETTID());
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user