[CP] support print all tx ctx when transfer detect active trans
This commit is contained in:
parent
e676b138a5
commit
273379cff3
@ -765,6 +765,7 @@ public:
|
||||
|
||||
DELEGATE_WITH_RET(ls_tx_svr_, get_tx_ctx_count, int);
|
||||
DELEGATE_WITH_RET(ls_tx_svr_, get_active_tx_count, int);
|
||||
DELEGATE_WITH_RET(ls_tx_svr_, print_all_tx_ctx, int);
|
||||
//dup table ls meta interface
|
||||
CONST_DELEGATE_WITH_RET(dup_table_ls_handler_, get_dup_table_ls_meta, int);
|
||||
DELEGATE_WITH_RET(dup_table_ls_handler_, set_dup_table_ls_meta, int);
|
||||
|
@ -775,6 +775,19 @@ int ObLSTxService::get_active_tx_count(int64_t &active_tx_count)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObLSTxService::print_all_tx_ctx(const int64_t print_num)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_ISNULL(mgr_)) {
|
||||
ret = OB_NOT_INIT;
|
||||
TRANS_LOG(WARN, "not init", KR(ret), K_(ls_id));
|
||||
} else {
|
||||
const bool verbose = true;
|
||||
mgr_->print_all_tx_ctx(print_num, verbose);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObLSTxService::set_max_replay_commit_version(share::SCN commit_version)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -147,6 +147,8 @@ public:
|
||||
int iterate_tx_obj_lock_op(transaction::tablelock::ObLockOpIterator &iter) const;
|
||||
int get_tx_ctx_count(int64_t &tx_ctx_count);
|
||||
int get_active_tx_count(int64_t &active_tx_count);
|
||||
int print_all_tx_ctx(const int64_t print_num);
|
||||
|
||||
public:
|
||||
int replay(const void *buffer, const int64_t nbytes, const palf::LSN &lsn, const share::SCN &scn);
|
||||
|
||||
|
@ -2537,6 +2537,10 @@ int ObGetLSActiveTransCountP::process()
|
||||
LOG_WARN("src ls migration status is not none", K(ret), K(migration_status), KPC(ls), K(arg_));
|
||||
} else if (OB_FAIL(ls->get_active_tx_count(result_.active_trans_count_))) {
|
||||
LOG_WARN("failed to get active trans count", K(ret), KPC(ls), K(arg_));
|
||||
} else if (0 == result_.active_trans_count_) {
|
||||
// do nothing
|
||||
} else if (OB_FAIL(ls->print_all_tx_ctx(1/*print_num*/))) {
|
||||
LOG_WARN("failed to print all tx ctx", K(ret), KPC(ls));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user