[opensource][XA] fix some cases for white scan
This commit is contained in:
@ -35,6 +35,8 @@ typedef common::ObList<common::ObPartitionKey, ObArenaAllocator> ObPartitionList
|
||||
|
||||
struct ObXABranchInfo {
|
||||
ObXABranchInfo()
|
||||
: xid_(), state_(ObXATransState::UNKNOWN), timeout_seconds_(-1), abs_expired_time_(-1),
|
||||
addr_(), unrespond_msg_cnt_(-1), last_hb_ts_(-1)
|
||||
{}
|
||||
virtual ~ObXABranchInfo()
|
||||
{}
|
||||
|
||||
@ -35,6 +35,7 @@ class ObXAPrepareRPCRequest {
|
||||
|
||||
public:
|
||||
ObXAPrepareRPCRequest()
|
||||
: trans_id_(), xid_(), stmt_timeout_(-1)
|
||||
{}
|
||||
~ObXAPrepareRPCRequest()
|
||||
{}
|
||||
@ -68,6 +69,7 @@ class ObXAEndTransRPCRequest {
|
||||
|
||||
public:
|
||||
ObXAEndTransRPCRequest()
|
||||
: trans_id_(), xid_(), is_rollback_(false), is_terminated_(false)
|
||||
{}
|
||||
~ObXAEndTransRPCRequest()
|
||||
{}
|
||||
@ -112,6 +114,8 @@ class ObXASyncStatusRPCRequest {
|
||||
|
||||
public:
|
||||
ObXASyncStatusRPCRequest()
|
||||
: trans_id_(), xid_(), sender_(), is_new_branch_(false), is_stmt_pull_(false), is_tightly_coupled_(false),
|
||||
pull_trans_desc_(false), timeout_seconds_(-1)
|
||||
{}
|
||||
~ObXASyncStatusRPCRequest()
|
||||
{}
|
||||
@ -177,6 +181,7 @@ class ObXASyncStatusRPCResponse {
|
||||
|
||||
public:
|
||||
ObXASyncStatusRPCResponse()
|
||||
: trans_desc_(), is_stmt_pull_(false)
|
||||
{}
|
||||
~ObXASyncStatusRPCResponse()
|
||||
{}
|
||||
@ -205,6 +210,7 @@ class ObXAMergeStatusRPCRequest {
|
||||
|
||||
public:
|
||||
ObXAMergeStatusRPCRequest()
|
||||
: trans_desc_(), is_stmt_push_(false), is_tightly_coupled_(false), xid_(), seq_no_(-1)
|
||||
{}
|
||||
~ObXAMergeStatusRPCRequest()
|
||||
{}
|
||||
@ -249,6 +255,7 @@ class ObXAHbRequest {
|
||||
|
||||
public:
|
||||
ObXAHbRequest()
|
||||
: trans_id_(), xid_(), sender_()
|
||||
{}
|
||||
~ObXAHbRequest()
|
||||
{}
|
||||
|
||||
@ -22,7 +22,7 @@ class ObTransService;
|
||||
|
||||
class ObXATransHeartbeatWorker : public share::ObThreadPool {
|
||||
public:
|
||||
ObXATransHeartbeatWorker() : is_inited_(false), is_running_(false)
|
||||
ObXATransHeartbeatWorker() : is_inited_(false), is_running_(false), trans_service_(NULL)
|
||||
{}
|
||||
~ObXATransHeartbeatWorker()
|
||||
{
|
||||
|
||||
@ -2444,7 +2444,6 @@ int ObTransService::insert_xa_lock(
|
||||
char trans_id_buf[512];
|
||||
trans_id.to_string(trans_id_buf, 512);
|
||||
char scheduler_ip_buf[128];
|
||||
self_.ip_to_string(scheduler_ip_buf, 128);
|
||||
char gtrid_str[128];
|
||||
int64_t gtrid_len = 0;
|
||||
char bqual_str[128];
|
||||
@ -2455,6 +2454,9 @@ int ObTransService::insert_xa_lock(
|
||||
if (!is_valid_tenant_id(tenant_id) || xid.empty() || !trans_id.is_valid()) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
TRANS_LOG(WARN, "invalid argument", K(ret), K(tenant_id), K(xid), K(trans_id));
|
||||
} else if (!self_.ip_to_string(scheduler_ip_buf, 128)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
TRANS_LOG(WARN, "fail to get string of self address", K(ret), K_(self));
|
||||
} else if (OB_FAIL(hex_print(xid.get_gtrid_str().ptr(), xid.get_gtrid_str().length(), gtrid_str, 128, gtrid_len))) {
|
||||
TRANS_LOG(WARN, "fail to convert gtrid to hex", K(ret), K(tenant_id), K(xid));
|
||||
} else if (OB_FAIL(sql.assign_fmt(INSERT_XA_LOCK_SQL,
|
||||
@ -2508,7 +2510,6 @@ int ObTransService::insert_xa_record(const uint64_t tenant_id, const ObXATransID
|
||||
char trans_id_buf[512];
|
||||
trans_id.to_string(trans_id_buf, 512);
|
||||
char scheduler_ip_buf[128];
|
||||
sche_addr.ip_to_string(scheduler_ip_buf, 128);
|
||||
char gtrid_str[128];
|
||||
int64_t gtrid_len = 0;
|
||||
char bqual_str[128];
|
||||
@ -2519,6 +2520,9 @@ int ObTransService::insert_xa_record(const uint64_t tenant_id, const ObXATransID
|
||||
if (!is_valid_tenant_id(tenant_id) || xid.empty() || !trans_id.is_valid()) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
TRANS_LOG(WARN, "invalid argument", K(ret), K(tenant_id), K(xid), K(trans_id));
|
||||
} else if (!self_.ip_to_string(scheduler_ip_buf, 128)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
TRANS_LOG(WARN, "fail to get string of self address", K(ret), K_(self));
|
||||
} else if (OB_FAIL(hex_print(xid.get_gtrid_str().ptr(), xid.get_gtrid_str().length(), gtrid_str, 128, gtrid_len))) {
|
||||
TRANS_LOG(WARN, "fail to convert gtrid to hex", K(ret), K(tenant_id), K(xid));
|
||||
} else if (OB_FAIL(hex_print(xid.get_bqual_str().ptr(), xid.get_bqual_str().length(), bqual_str, 128, bqual_len))) {
|
||||
|
||||
Reference in New Issue
Block a user