Fix the crash about qc monitor info
This commit is contained in:
@ -29,7 +29,7 @@ OB_SERIALIZE_MEMBER(ObP2PDhMapInfo,
|
|||||||
p2p_sequence_ids_,
|
p2p_sequence_ids_,
|
||||||
target_addrs_);
|
target_addrs_);
|
||||||
|
|
||||||
OB_SERIALIZE_MEMBER(ObQCMonitoringInfo, sql_, qc_tid_);
|
OB_SERIALIZE_MEMBER(ObQCMonitoringInfo, cur_sql_, qc_tid_);
|
||||||
|
|
||||||
OB_SERIALIZE_MEMBER(ObPxSqcMeta,
|
OB_SERIALIZE_MEMBER(ObPxSqcMeta,
|
||||||
execution_id_,
|
execution_id_,
|
||||||
@ -99,24 +99,24 @@ OB_SERIALIZE_MEMBER(ObPxCleanDtlIntermResArgs, info_, batch_size_);
|
|||||||
int ObQCMonitoringInfo::init(const ObExecContext &exec_ctx) {
|
int ObQCMonitoringInfo::init(const ObExecContext &exec_ctx) {
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
qc_tid_ = GETTID();
|
qc_tid_ = GETTID();
|
||||||
if (OB_NOT_NULL(exec_ctx.get_sql_ctx())) {
|
if (OB_NOT_NULL(exec_ctx.get_my_session())) {
|
||||||
sql_ = exec_ctx.get_sql_ctx()->cur_sql_;
|
cur_sql_ = exec_ctx.get_my_session()->get_current_query_string();
|
||||||
}
|
}
|
||||||
if (sql_.length() > ObQCMonitoringInfo::LIMIT_LENGTH) {
|
if (cur_sql_.length() > ObQCMonitoringInfo::LIMIT_LENGTH) {
|
||||||
sql_.set_length(ObQCMonitoringInfo::LIMIT_LENGTH);
|
cur_sql_.assign(cur_sql_.ptr(), ObQCMonitoringInfo::LIMIT_LENGTH);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObQCMonitoringInfo::assign(const ObQCMonitoringInfo &other) {
|
int ObQCMonitoringInfo::assign(const ObQCMonitoringInfo &other) {
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
sql_ = other.sql_;
|
cur_sql_ = other.cur_sql_;
|
||||||
qc_tid_ = other.qc_tid_;
|
qc_tid_ = other.qc_tid_;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObQCMonitoringInfo::reset() {
|
void ObQCMonitoringInfo::reset() {
|
||||||
sql_.reset();
|
cur_sql_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObPxSqcMeta::assign(const ObPxSqcMeta &other)
|
int ObPxSqcMeta::assign(const ObPxSqcMeta &other)
|
||||||
|
|||||||
@ -189,12 +189,12 @@ public:
|
|||||||
int assign(const ObQCMonitoringInfo &other);
|
int assign(const ObQCMonitoringInfo &other);
|
||||||
void reset();
|
void reset();
|
||||||
public:
|
public:
|
||||||
common::ObString sql_;
|
common::ObString cur_sql_;
|
||||||
// in nested px situation, it is the current px coordinator's thread id
|
// in nested px situation, it is the current px coordinator's thread id
|
||||||
int64_t qc_tid_;
|
int64_t qc_tid_;
|
||||||
// no need to deserialize
|
// no need to deserialize
|
||||||
static constexpr int64_t LIMIT_LENGTH = 100;
|
static constexpr int64_t LIMIT_LENGTH = 100;
|
||||||
TO_STRING_KV(K_(sql), K_(qc_tid));
|
TO_STRING_KV(K_(cur_sql), K_(qc_tid));
|
||||||
};
|
};
|
||||||
|
|
||||||
// PX 端描述每个 SQC 的数据结构
|
// PX 端描述每个 SQC 的数据结构
|
||||||
|
|||||||
Reference in New Issue
Block a user