fix bug: qc_detectable_id is invalid when sqc register check item

This commit is contained in:
obdev
2023-05-04 13:41:58 +00:00
committed by ob-robot
parent d8ae8e2449
commit ce0d9ddd4b
3 changed files with 11 additions and 4 deletions

View File

@ -17,6 +17,7 @@
#include "sql/dtl/ob_dtl_interm_result_manager.h"
#include "sql/engine/px/ob_px_sqc_handler.h"
#include "sql/engine/px/p2p_datahub/ob_p2p_dh_msg.h"
#include "sql/engine/px/ob_px_scheduler.h"
using namespace oceanbase::sql;
using namespace oceanbase::sql::dtl;
@ -37,11 +38,13 @@ void ObDetectManagerUtils::prepare_register_dm_info(common::ObRegisterDmInfo &re
int ObDetectManagerUtils::qc_register_detectable_id_into_dm(ObDetectableId &detectable_id,
bool &register_detectable_id,
uint64_t tenant_id)
uint64_t tenant_id,
ObPxCoordInfo& coord_info)
{
int ret = OB_SUCCESS;
if (OB_FAIL(ObDetectManagerUtils::generate_detectable_id(detectable_id, tenant_id))) {
LIB_LOG(WARN, "[DM] failed to generate_detectable_id", K(tenant_id));
} else if (FALSE_IT(coord_info.qc_detectable_id_ = detectable_id)) {
} else {
ObDetectManager* dm = MTL(ObDetectManager*);
if (OB_ISNULL(dm)) {

View File

@ -19,6 +19,7 @@ namespace sql {
class ObDfo;
class ObPxSqcHandler;
class ObPxSqcMeta;
class ObPxCoordInfo;
namespace dtl {
class ObDTLIntermResultKey;
class ObDTLIntermResultInfo;
@ -39,7 +40,8 @@ public:
static void prepare_register_dm_info(common::ObRegisterDmInfo &register_dm_info, sql::ObPxSqcHandler *handler);
static int qc_register_detectable_id_into_dm(common::ObDetectableId &detectable_id,
bool &register_detectable_id, uint64_t tenant_id);
bool &register_detectable_id, uint64_t tenant_id,
sql::ObPxCoordInfo& coord_info);
static void qc_unregister_detectable_id_from_dm(const common::ObDetectableId &detectable_id,
bool &register_detectable_id);
static int qc_register_check_item_into_dm(sql::ObDfo &dfo,

View File

@ -266,7 +266,8 @@ int ObPxCoordOp::rescan()
} else if (OB_FAIL(register_interrupt())) {
LOG_WARN("fail to register interrupt", K(ret));
} else if (OB_NOT_NULL(get_spec().get_phy_plan()) && get_spec().get_phy_plan()->is_enable_px_fast_reclaim()
&& OB_FAIL(ObDetectManagerUtils::qc_register_detectable_id_into_dm(detectable_id_, register_detectable_id_, GET_TENANT_ID()))) {
&& OB_FAIL(ObDetectManagerUtils::qc_register_detectable_id_into_dm(detectable_id_, register_detectable_id_,
GET_TENANT_ID(), coord_info_))) {
LOG_WARN("fail to register detectable_id", K(ret));
} else if (OB_FAIL(init_dfo_mgr(
ObDfoInterruptIdGen(interrupt_id_,
@ -363,7 +364,8 @@ int ObPxCoordOp::inner_open()
} else if (OB_FAIL(register_interrupt())) {
LOG_WARN("fail to register interrupt", K(ret));
} else if (OB_NOT_NULL(get_spec().get_phy_plan()) && get_spec().get_phy_plan()->is_enable_px_fast_reclaim()
&& OB_FAIL(ObDetectManagerUtils::qc_register_detectable_id_into_dm(detectable_id_, register_detectable_id_, GET_TENANT_ID()))) {
&& OB_FAIL(ObDetectManagerUtils::qc_register_detectable_id_into_dm(detectable_id_, register_detectable_id_,
GET_TENANT_ID(), coord_info_))) {
LOG_WARN("fail to register detectable_id", K(ret));
} else if (OB_FAIL(init_dfo_mgr(
ObDfoInterruptIdGen(interrupt_id_,