Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions deps/oblib/src/lib/ob_name_id_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -665,30 +665,10 @@ DEF_NAME(id, "id")
DEF_NAME_PAIR(flashback_partitions, "iter all tenant do cutdata")
DEF_NAME_PAIR(disconnect_cluster, "disconnect_cluster")
DEF_NAME_PAIR(wait_obs_disconnect_cluster, "wait obs disconnect_cluster")
// XA transaction
DEF_NAME(xid, "XA transaction id")
DEF_NAME(xa_start, "start XA transaction")
DEF_NAME(xa_end, "end XA transaction")
DEF_NAME(xa_prepare, "prepare XA transaction")
DEF_NAME(rollback_to, "rollback_to")
DEF_NAME(rollback_from, "rollback_from")
DEF_NAME(gtrid, "global transaction id")
DEF_NAME(bqual, "branch qualifier")
DEF_NAME(branch, "branch")
DEF_NAME(is_stmt, "is normal dml stmt")
DEF_NAME(xa_flag, "flag for xa transaciton")
DEF_NAME(remote_pull, "remote pull operation")
DEF_NAME(remote_push, "remote push operation")
DEF_NAME(stmt_lock, "acquire stmt lock successfully")
DEF_NAME(stmt_unlock, "release stmt lock successfully")
DEF_NAME(terminate, "terminate xa transaction")
DEF_NAME(xa_end_trans, "xa two phase commit/rollback")
DEF_NAME(xa_one_phase, "xa one phase commit/rollback")
DEF_NAME(xa_sync_response, "handle xa sync response")
DEF_NAME(xa_start_request, "handle xa start request")
DEF_NAME(xa_start_response, "handle xa start response")
DEF_NAME(xa_start_stmt_request, "handle xa start stmt request")
DEF_NAME(xa_start_stmt_response, "handle xa start stmt response")
DEF_NAME(terminate, "terminate transaction")

//////////////// << add new name BEFORE this line
DEF_NAME(__PAIR_NAME_BEGIN__, "invalid")
Expand Down
2 changes: 1 addition & 1 deletion deps/oblib/src/lib/stat/ob_latch_define.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LATCH_DEF_##enable(def, id, name, policy, max_spin_cnt, max_yield_cnt)
#undef LATCH_DEF_true
#undef LATCH_DEF_false

static_assert(ARRAYSIZEOF(OB_LATCHES) == 247, "update the expected latch count after changing definitions");
static_assert(ARRAYSIZEOF(OB_LATCHES) == 245, "update the expected latch count after changing definitions");
static_assert(ObLatchIds::LATCH_END == ARRAYSIZEOF(OB_LATCHES) - 1, "update id of LATCH_END before adding your defination");

}
Expand Down
2 changes: 0 additions & 2 deletions deps/oblib/src/lib/stat/ob_latch_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ LATCH_DEF(MEM_DUMP_ITER_LOCK, 105, "mem dump iter lock", LATCH_FIFO, 2000, 0, tr
LATCH_DEF(OB_REQ_TIMEINFO_LIST_LOCK, 106, "ob request timeinfo list lock",LATCH_FIFO, 2000, 0, true)
LATCH_DEF(HASH_MAP_LOCK, 110, "hashmap latch lock", LATCH_FIFO, 2000L, 0, true)
LATCH_DEF(TIMEZONE_LOCK, 112, "timezone lock", LATCH_READ_PREFER, 2000, 0, true)
LATCH_DEF(XA_STMT_LOCK, 115, "xa stmt lock", LATCH_FIFO, 2000, 0, true)
LATCH_DEF(MEMTABLE_CALLBACK_LIST_MGR_LOCK, 118, "memtable calback list mgr lock", LATCH_FIFO, INT64_MAX, 0, true)
LATCH_DEF(XA_CTX_LOCK, 119, "xa queue lock", LATCH_FIFO, 2000, 0, true)
LATCH_DEF(MASTER_KEY_LOCK, 120, "master key lock", LATCH_FIFO, 2000, 0, true)
LATCH_DEF(RATELIMIT_LOCK, 121, "ratelimit lock", LATCH_READ_PREFER, 2000, 0, true)
LATCH_DEF(LOG_OFFSET_ALLOC_LOCK, 124, "log_offset allocator latch", LATCH_FIFO, 2000, 0, true)
Expand Down
33 changes: 0 additions & 33 deletions deps/oblib/src/lib/statistic_event/ob_stat_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,39 +101,6 @@ STAT_EVENT_ADD_DEF(TX_DATA_HIT_KV_CACHE_COUNT, "tx data hit kv cache count", ObS
STAT_EVENT_ADD_DEF(TX_DATA_READ_TX_CTX_COUNT, "tx data read tx ctx count", ObStatClassIds::TRANS, 30084, false, true, true)
STAT_EVENT_ADD_DEF(TX_DATA_READ_TX_DATA_MEMTABLE_COUNT, "tx data read tx data memtable count", ObStatClassIds::TRANS, 30085, false, true, true)
STAT_EVENT_ADD_DEF(TX_DATA_READ_TX_DATA_SSTABLE_COUNT, "tx data read tx data sstable count", ObStatClassIds::TRANS, 30086, false, true, true)
// XA TRANS
STAT_EVENT_ADD_DEF(XA_START_TOTAL_COUNT, "xa start total count", ObStatClassIds::TRANS, 30200, false, true, true)
STAT_EVENT_ADD_DEF(XA_START_TOTAL_USED_TIME, "xa start total used time", ObStatClassIds::TRANS, 30201, false, true, true)
STAT_EVENT_ADD_DEF(XA_START_REMOTE_COUNT, "xa start with rpc total count", ObStatClassIds::TRANS, 30202, false, true, true)
STAT_EVENT_ADD_DEF(XA_START_FAIL_COUNT, "failed xa start total count", ObStatClassIds::TRANS, 30203, false, true, true)
STAT_EVENT_ADD_DEF(XA_END_TOTAL_COUNT, "xa end total count", ObStatClassIds::TRANS, 30204, false, true, true)
STAT_EVENT_ADD_DEF(XA_END_TOTAL_USED_TIME, "xa end total used count", ObStatClassIds::TRANS, 30205, false, true, true)
STAT_EVENT_ADD_DEF(XA_END_REMOTE_COUNT, "xa end with rpc total count", ObStatClassIds::TRANS, 30206, false, true, true)
STAT_EVENT_ADD_DEF(XA_END_FAIL_COUNT, "failed xa end total count", ObStatClassIds::TRANS, 30207, false, true, true)
STAT_EVENT_ADD_DEF(XA_PREPARE_TOTAL_COUNT, "xa prepare total count", ObStatClassIds::TRANS, 30208, false, true, true)
STAT_EVENT_ADD_DEF(XA_PREPARE_TOTAL_USED_TIME, "xa prepare total used time", ObStatClassIds::TRANS, 30209, false, true, true)
STAT_EVENT_ADD_DEF(XA_PREPARE_REMOTE_COUNT, "xa prepare with rpc total count", ObStatClassIds::TRANS, 30210, false, true, true)
STAT_EVENT_ADD_DEF(XA_PREPARE_FAIL_COUNT, "failed xa prepare total count", ObStatClassIds::TRANS, 30211, false, true, true)
STAT_EVENT_ADD_DEF(XA_COMMIT_TOTAL_COUNT, "xa commit total count", ObStatClassIds::TRANS, 30212, false, true, true)
STAT_EVENT_ADD_DEF(XA_COMMIT_TOTAL_USED_TIME, "xa commit total used time", ObStatClassIds::TRANS, 30213, false, true, true)
STAT_EVENT_ADD_DEF(XA_COMMIT_REMOTE_COUNT, "xa commit with rpc total count", ObStatClassIds::TRANS, 30214, false, true, true)
STAT_EVENT_ADD_DEF(XA_COMMIT_FAIL_COUNT, "failed xa commit total count", ObStatClassIds::TRANS, 30215, false, true, true)
STAT_EVENT_ADD_DEF(XA_ROLLBACK_TOTAL_COUNT, "xa rollback total count", ObStatClassIds::TRANS, 30216, false, true, true)
STAT_EVENT_ADD_DEF(XA_ROLLBACK_TOTAL_USED_TIME, "xa rollback total used time", ObStatClassIds::TRANS, 30217, false, true, true)
STAT_EVENT_ADD_DEF(XA_ROLLBACK_REMOTE_COUNT, "xa rollback with rpc total count", ObStatClassIds::TRANS, 30218, false, true, true)
STAT_EVENT_ADD_DEF(XA_ROLLBACK_FAIL_COUNT, "failed xa rollback total count", ObStatClassIds::TRANS, 30219, false, true, true)
STAT_EVENT_ADD_DEF(XA_TRANS_START_COUNT, "started xa trans count", ObStatClassIds::TRANS, 30220, false, true, true)
STAT_EVENT_ADD_DEF(XA_READ_ONLY_TRANS_TOTAL_COUNT, "read only xa trans total count", ObStatClassIds::TRANS, 30221, false, true, true)
STAT_EVENT_ADD_DEF(XA_ONE_PHASE_COMMIT_TOTAL_COUNT, "xa trans with one phase commit total count", ObStatClassIds::TRANS, 30222, false, true, true)
STAT_EVENT_ADD_DEF(XA_INNER_SQL_TOTAL_COUNT, "inner sql total count in xa statement", ObStatClassIds::TRANS, 30223, false, true, true)
STAT_EVENT_ADD_DEF(XA_INNER_SQL_TEN_MS_COUNT, "total count of inner sql (latency >= 10ms) in xa statement", ObStatClassIds::TRANS, 30224, false, true, true)
STAT_EVENT_ADD_DEF(XA_INNER_SQL_TWENTY_MS_COUNT, "total count of inner sql (latency >= 20ms) in xa statement", ObStatClassIds::TRANS, 30225, false, true, true)
STAT_EVENT_ADD_DEF(XA_INNER_SQL_TOTAL_USED_TIME, "inner sql total used time in xa statement", ObStatClassIds::TRANS, 30226, false, true, true)
STAT_EVENT_ADD_DEF(XA_INNER_RPC_TOTAL_COUNT, "inner rpc total count in xa statement", ObStatClassIds::TRANS, 30227, false, true, true)
STAT_EVENT_ADD_DEF(XA_INNER_RPC_TEN_MS_COUNT, "total count of inner rpc (latency >= 10ms) in xa statement", ObStatClassIds::TRANS, 30228, false, true, true)
STAT_EVENT_ADD_DEF(XA_INNER_RPC_TWENTY_MS_COUNT, "total count of inner rpc (latency >= 20ms) in xa statement", ObStatClassIds::TRANS, 30229, false, true, true)
STAT_EVENT_ADD_DEF(XA_INNER_RPC_TOTAL_USED_TIME, "inner rpc total used time in xa statement", ObStatClassIds::TRANS, 30230, false, true, true)

// SQL
STAT_EVENT_ADD_DEF(SQL_SELECT_COUNT, "sql select count", ObStatClassIds::SQL, 40000, false, true, true)
STAT_EVENT_ADD_DEF(SQL_SELECT_TIME, "sql select time", ObStatClassIds::SQL, 40001, false, true, true)
Expand Down
8 changes: 0 additions & 8 deletions deps/oblib/src/lib/trace/ob_trace_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@ FLT_DEF_SPAN(com_query_process, "com_query process")
FLT_DEF_SPAN(end_transaction, "end of transaction")
// for transaction end

// for xa transaction
FLT_DEF_SPAN(xa_start, "xa start")
FLT_DEF_SPAN(xa_end, "xa end")
FLT_DEF_SPAN(xa_prepare, "xa prepare")
FLT_DEF_SPAN(xa_commit, "xa commit")
FLT_DEF_SPAN(xa_rollback, "xa rollback")
// for xa transaction end

// for ps
FLT_DEF_SPAN(ps_prepare, "prepare phase of ps protocol")
FLT_DEF_SPAN(ps_execute, "execute phase of ps protocol")
Expand Down
6 changes: 0 additions & 6 deletions deps/oblib/src/lib/utility/ob_tracepoint_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,6 @@ GLOBAL_ERRSIM_POINT_DEF(254, EN_ADAPTIVE_GROUP_BY_SMALL_CACHE, "Used to simulate
GLOBAL_ERRSIM_POINT_DEF(255, EN_DISABLE_REMOTE_EXEC_WITH_PLAN, "");
GLOBAL_ERRSIM_POINT_DEF(256, EN_REMOTE_EXEC_ERR, "");

GLOBAL_ERRSIM_POINT_DEF(260, EN_XA_PREPARE_ERROR, "");
GLOBAL_ERRSIM_POINT_DEF(261, EN_XA_UPDATE_COORD_FAILED, "");
GLOBAL_ERRSIM_POINT_DEF(262, EN_XA_PREPARE_RESP_LOST, "");
GLOBAL_ERRSIM_POINT_DEF(263, EN_XA_RPC_TIMEOUT, "");
GLOBAL_ERRSIM_POINT_DEF(264, EN_XA_COMMIT_ABORT_RESP_LOST, "");
GLOBAL_ERRSIM_POINT_DEF(265, EN_XA_1PC_RESP_LOST, "");
GLOBAL_ERRSIM_POINT_DEF(266, EN_DISK_ERROR, "Deprecated variable");


Expand Down
3 changes: 1 addition & 2 deletions docs/developer-guide/en/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ scn:1702288855704049}, uncertain_bound:0, snapshot_lsid:{id:1},
snapshot_ls_role:0, parts:[{left:{id:1}, right:491146514786417}]},
savepoint=1702288855704049, tx_desc={this:0x7f31df697420,
tx_id:{txid:167035}, state:2, addr:"127.0.0.1:55801", tenant_id:1003,
session_id:1, assoc_session_id:1, xid:NULL, xa_mode:"",
xa_start_addr:"0.0.0.0:0", access_mode:0, tx_consistency_type:0,
session_id:1, assoc_session_id:1, access_mode:0, tx_consistency_type:0,
isolation:1, snapshot_version:{val:18446744073709551615, v:3},
snapshot_scn:0, active_scn:1702288855704040, op_sn:6, alloc_ts:1702288855706134,
active_ts:1702288855706134, commit_ts:-1, finish_ts:-1, timeout_us:29999942,
Expand Down
3 changes: 1 addition & 2 deletions docs/developer-guide/zh/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ scn:1702288855704049}, uncertain_bound:0, snapshot_lsid:{id:1},
snapshot_ls_role:0, parts:[{left:{id:1}, right:491146514786417}]},
savepoint=1702288855704049, tx_desc={this:0x7f31df697420,
tx_id:{txid:167035}, state:2, addr:"127.0.0.1:55801", tenant_id:1003,
session_id:1, assoc_session_id:1, xid:NULL, xa_mode:"",
xa_start_addr:"0.0.0.0:0", access_mode:0, tx_consistency_type:0,
session_id:1, assoc_session_id:1, access_mode:0, tx_consistency_type:0,
isolation:1, snapshot_version:{val:18446744073709551615, v:3},
snapshot_scn:0, active_scn:1702288855704040, op_sn:6, alloc_ts:1702288855706134,
active_ts:1702288855706134, commit_ts:-1, finish_ts:-1, timeout_us:29999942,
Expand Down
7 changes: 0 additions & 7 deletions src/objit/include/objit/common/ob_item_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -1900,12 +1900,6 @@ typedef enum ObItemType
T_OPTIMIZE_TABLE = 4117,
T_OPTIMIZE_TENANT = 4118,
T_OPTIMIZE_ALL = 4119,
// xa transaction
T_XA_START = 4120,
T_XA_END = 4121,
T_XA_PREPARE = 4122,
T_XA_COMMIT = 4123,
T_XA_ROLLBACK = 4124,
//cluster mgr
T_REMOVE_CLUSTER = 4125,
T_ADD_CLUSTER = 4126,
Expand Down Expand Up @@ -2458,7 +2452,6 @@ typedef enum ObItemType
T_SET_UNION_ALL = 4686,
T_SHOW_CHECK_TABLE = 4687,
T_SHARED_STORAGE_INFO = 4688,
T_XA_RECOVER = 4689,
T_VEC_INDEX_PARAMS = 4690,
T_VEC_INDEX_COLUMN = 4691,
T_VEC_INDEX_COLUMN_EXPR = 4692,
Expand Down
6 changes: 0 additions & 6 deletions src/observer/mysql/ob_query_response_time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,6 @@ int ObRespTimeInfoCollector::collect(const sql::stmt::StmtType sql_type, const b
}
break;
}
case sql::stmt::T_XA_COMMIT : {
if (OB_FAIL(commit_sql_info_.collect(pos, resp_time))) {
LOG_WARN("commit info failed to collect resp time", K(ret), K(pos), K(resp_time), K(utility_.bound_count()));
}
break;
}
default: {
if (OB_FAIL(other_sql_info_.collect(pos, resp_time))) {
LOG_WARN("other info failed to collect resp time", K(ret), K(pos), K(resp_time), K(utility_.bound_count()));
Expand Down
4 changes: 2 additions & 2 deletions src/observer/mysql/obmp_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ int ObMPQuery::process_single_stmt(const ObMultiStmtItem &multi_stmt_item,
stmt::StmtType stmt_type = stmt::T_NONE;
if (!ERRSIM_BEGIN_COMMIT_OPT_DISABLE && !multi_stmt_item.is_part_of_multi_stmt()) {
check_is_trans_ctrl_cmd(multi_stmt_item.get_sql(), is_trans_ctrl_cmd, stmt_type);
if (is_trans_ctrl_cmd && !session.associated_xa()) {
if (is_trans_ctrl_cmd) {
do_trans_ctrl_opt = true;
}
}
Expand Down Expand Up @@ -783,7 +783,7 @@ int ObMPQuery::process_trans_ctrl_cmd(ObSQLSessionInfo &session,
bool read_only = session.get_tx_read_only();
transaction::ObTxParam tx_param;
TransState trans_state;
// stmt is T_START_TRANS and not xa cmd, try to end trans before start trans
// End the current transaction before starting a new one.
if (OB_FAIL(ObSqlTransControl::end_trans_before_cmd_execute(session,
need_disconnect,
trans_state,
Expand Down
9 changes: 2 additions & 7 deletions src/observer/mysql/obmp_reset_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,14 @@ int ObMPResetConnection::process()

// 1. Rolls back any active transactions and resets autocommit mode.
if (OB_SUCC(ret)) {
// for XA trans, can not rollback it directly, use kill_tx to abort it
if (session->associated_xa()) {
if (OB_FAIL(ObSqlTransControl::kill_tx(session, OB_TRANS_ROLLBACKED))) {
OB_LOG(WARN, "fail to kill xa trans for reset connection", K(ret));
}
} else if (OB_FAIL(ObSqlTransControl::rollback_trans(session, need_disconnect))) {
if (OB_FAIL(ObSqlTransControl::rollback_trans(session, need_disconnect))) {
OB_LOG(WARN, "fail to rollback trans for reset connection", K(ret), K(need_disconnect));
}
}

// 3. Closes (and drops) all TEMPORARY tables.
if (OB_SUCC(ret)) {
if (OB_UNLIKELY(OB_FAIL(session->drop_temp_tables(false, false, true)))) {
if (OB_UNLIKELY(OB_FAIL(session->drop_temp_tables(false, true)))) {
LOG_WARN("fail to drop temp tables", K(ret));
}
}
Expand Down
6 changes: 0 additions & 6 deletions src/observer/virtual_table/ob_all_virtual_engine_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ int ObAllVirtualEngineTable::inner_get_next_row(common::ObNewRow *&row)
ObCharset::get_default_charset()));
break;
}
case XA: {
cells[cell_idx].set_varchar("NO");
cells[cell_idx].set_collation_type(ObCharset::get_default_collation(
ObCharset::get_default_charset()));
break;
}
case SAVEPOINTS: {
cells[cell_idx].set_varchar("NO");
cells[cell_idx].set_collation_type(ObCharset::get_default_collation(
Expand Down
3 changes: 1 addition & 2 deletions src/observer/virtual_table/ob_all_virtual_engine_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ namespace observer
{
class ObAllVirtualEngineTable : public common::ObVirtualTableScannerIterator
{
static const int32_t ENGINE_COLUMN_COUNT = 6;
static const int32_t ENGINE_COLUMN_COUNT = 5;
enum COLUMN_NAME {
ENGINE = common::OB_APP_MIN_COLUMN_ID,
SUPPORT,
COMMENT,
TRANSACTIONS,
XA,
SAVEPOINTS,
};
public:
Expand Down
26 changes: 0 additions & 26 deletions src/observer/virtual_table/ob_all_virtual_tx_scheduler_stat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ namespace observer

ObGVTxSchedulerStat::ObGVTxSchedulerStat()
: ObVirtualTableScannerIterator(),
xid_(),
tx_scheduler_stat_iter_()
{
}
Expand All @@ -44,7 +43,6 @@ void ObGVTxSchedulerStat::reset()
parts_buffer_[0] = '\0';
tx_desc_addr_buffer_[0] = '\0';
savepoints_buffer_[0] = '\0';
xid_.reset();
ObVirtualTableScannerIterator::reset();
}

Expand Down Expand Up @@ -92,7 +90,6 @@ int ObGVTxSchedulerStat::inner_get_next_row(common::ObNewRow *&row)
}
} else {
const int64_t col_count = output_column_ids_.count();
xid_ = tx_scheduler_stat.xid_;
for (int64_t i = 0; OB_SUCC(ret) && i < col_count; ++i) {
uint64_t col_id = output_column_ids_.at(i);
switch (col_id) {
Expand Down Expand Up @@ -177,29 +174,6 @@ int ObGVTxSchedulerStat::inner_get_next_row(common::ObNewRow *&row)
case CAN_EARLY_LOCK_RELEASE:
cur_row_.cells_[i].set_bool(tx_scheduler_stat.can_elr_);
break;
case GTRID:
if (!xid_.empty()) {
cur_row_.cells_[i].set_varchar(xid_.get_gtrid_str());
cur_row_.cells_[i].set_default_collation_type();
} else {
cur_row_.cells_[i].reset();
}
break;
case BQUAL:
if (!xid_.empty()) {
cur_row_.cells_[i].set_varchar(xid_.get_bqual_str());
cur_row_.cells_[i].set_default_collation_type();
} else {
cur_row_.cells_[i].reset();
}
break;
case FORMAT_ID:
if (!xid_.empty()) {
cur_row_.cells_[i].set_int(xid_.get_format_id());
} else {
cur_row_.cells_[i].set_int(-1);
}
break;
default:
ret = OB_ERR_UNEXPECTED;
SERVER_LOG(WARN, "invalid coloum_id", KR(ret), K(col_id));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,12 @@ class ObGVTxSchedulerStat: public common::ObVirtualTableScannerIterator
SAVEPOINTS,
SAVEPOINTS_TOTAL_CNT,
INTERNAL_ABORT_CAUSE,
CAN_EARLY_LOCK_RELEASE,
GTRID,
BQUAL,
FORMAT_ID
CAN_EARLY_LOCK_RELEASE
};
static const int64_t OB_MAX_BUFFER_SIZE = 1024;
char parts_buffer_[OB_MAX_BUFFER_SIZE];
char tx_desc_addr_buffer_[20];
char savepoints_buffer_[OB_MAX_BUFFER_SIZE];
transaction::ObXATransID xid_;
transaction::ObTxSchedulerStatIterator tx_scheduler_stat_iter_;
DISALLOW_COPY_AND_ASSIGN(ObGVTxSchedulerStat);
};
Expand Down
28 changes: 0 additions & 28 deletions src/observer/virtual_table/ob_all_virtual_tx_stat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ ObGVTxStat::ObGVTxStat()
: ObVirtualTableScannerIterator(),
ctx_addr_buffer_(),
tx_stat_iter_(),
xid_(),
cstring_helper_()
{}

void ObGVTxStat::reset()
{
ctx_addr_buffer_[0] = '\0';
tx_stat_iter_.reset();
xid_.reset();
cstring_helper_.reset();
ObVirtualTableScannerIterator::reset();
}
Expand Down Expand Up @@ -85,7 +83,6 @@ int ObGVTxStat::inner_get_next_row(ObNewRow *&row)
}
} else {
const int64_t col_count = output_column_ids_.count();
xid_ = tx_stat.xid_;
cstring_helper_.reset();
for (int64_t i = 0; OB_SUCC(ret) && i < col_count; ++i) {
uint64_t col_id = output_column_ids_.at(i);
Expand Down Expand Up @@ -152,31 +149,6 @@ int ObGVTxStat::inner_get_next_row(ObNewRow *&row)
case LAST_REQUEST_TS:
cur_row_.cells_[i].set_timestamp(tx_stat.last_request_ts_);
break;
case GTRID:
if (!xid_.empty()) {
cur_row_.cells_[i].set_varchar(xid_.get_gtrid_str());
cur_row_.cells_[i].set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
} else {
// use default value NULL
cur_row_.cells_[i].reset();
}
break;
case BQUAL:
if (!xid_.empty()) {
cur_row_.cells_[i].set_varchar(xid_.get_bqual_str());
cur_row_.cells_[i].set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
} else {
// use default value NULL
cur_row_.cells_[i].reset();
}
break;
case FORMAT_ID:
if (!xid_.empty()) {
cur_row_.cells_[i].set_int(xid_.get_format_id());
} else {
cur_row_.cells_[i].set_int(-1);
}
break;
case START_SCN:
cur_row_.cells_[i].set_uint64(tx_stat.start_scn_.get_val_for_inner_table_field());
break;
Expand Down
4 changes: 0 additions & 4 deletions src/observer/virtual_table/ob_all_virtual_tx_stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ class ObGVTxStat: public common::ObVirtualTableScannerIterator
FLUSHED_LOG_SIZE,
IS_EXITING,
LAST_REQUEST_TS,
GTRID,
BQUAL,
FORMAT_ID,
START_SCN,
END_SCN,
REC_SCN,
Expand All @@ -88,7 +85,6 @@ class ObGVTxStat: public common::ObVirtualTableScannerIterator
char ctx_addr_buffer_[CTX_ADDR_BUFFER_SIZE];
private:
transaction::ObTxStatIterator tx_stat_iter_;
transaction::ObXATransID xid_;
ObCStringHelper cstring_helper_;
private:
DISALLOW_COPY_AND_ASSIGN(ObGVTxStat);
Expand Down
Loading
Loading