Fix plan with das for update hang in px transmit operator

This commit is contained in:
qianchanger 2023-01-06 14:38:14 +00:00 committed by ob-robot
parent 2cfa340452
commit c082c93fd4
6 changed files with 6 additions and 19 deletions

View File

@ -201,7 +201,7 @@ function build
;;
xrpm)
STATIC_LINK_LGPL_DEPS_OPTION=OFF
do_build "$@" -DOB_BUILD_RPM=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOB_USE_LLD=$LLD_OPTION -DENABLE_FATAL_ERROR_HANG=OFF -DENABLE_AUTO_FDO=ON -DENABLE_THIN_LTO=ON -DOB_STATIC_LINK_LGPL_DEPS=$STATIC_LINK_LGPL_DEPS_OPTION
do_build "$@" -DOB_BUILD_RPM=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOB_USE_LLD=$LLD_OPTION -DENABLE_FATAL_ERROR_HANG=OFF -DENABLE_AUTO_FDO=ON -DOB_STATIC_LINK_LGPL_DEPS=$STATIC_LINK_LGPL_DEPS_OPTION
;;
xenable_smart_var_check)
do_build "$@" -DCMAKE_BUILD_TYPE=Debug -DOB_USE_LLD=$LLD_OPTION -DENABLE_SMART_VAR_CHECK=ON -DOB_ENABLE_AVX2=ON

View File

@ -164,16 +164,6 @@ void ObPxTransmitOp::destroy()
ObTransmitOp::destroy();
}
bool ObPxTransmitOp::is_dml_type_match_iter_end(bool need_drive_dml_query)
{
// In the new engine, insert, update, and delete no longer do real dml in inner_open,
// do real dml in get_next_row, so the original early termination logic needs to be modified,
// and other dml operators can still retain this optimization, such as replace, merge, etc.
return child_->get_spec().is_dml_operator() &&
!child_->get_spec().is_pdml_operator() &&
!need_drive_dml_query;
}
int ObPxTransmitOp::inner_open()
{
int ret = OB_SUCCESS;
@ -226,9 +216,6 @@ int ObPxTransmitOp::fetch_first_row()
OB_ISNULL(phy_plan = phy_plan_ctx->get_phy_plan())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("null phy_plan or phy_plan_ctx", K(phy_plan_ctx), K(phy_plan), K(ret));
} else if (is_dml_type_match_iter_end(phy_plan->need_drive_dml_query_)) {
iter_end_ = true;
LOG_TRACE("transmit iter end", K(ret), K(iter_end_));
} else {
const ObBatchRows *brs = NULL;
if (is_vectorized()) {

View File

@ -1,4 +1,5 @@
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
@ -148,7 +149,6 @@ private:
int broadcast_eof_row();
int next_row();
int set_rollup_hybrid_keys(ObSliceIdxCalc &slice_calc);
bool is_dml_type_match_iter_end(bool need_drive_dml_query);
int fetch_first_row();
int set_expect_range_count();

View File

@ -179,7 +179,7 @@ int ObLSMemberTable::on_commit_create_tablets(const obrpc::ObBatchCreateTabletAr
if (OB_FAIL(tablet_svr->on_abort_create_tablets(*arg, trans_flags))) {
LOG_WARN("fail to on_abort_create_tablets", KR(ret), KPC(arg), K(trans_flags));
} else {
ls->get_tablet_gc_handler()->set_tablet_gc_trigger();
ls->get_tablet_gc_handler()->set_tablet_persist_trigger();
}
}
if (OB_FAIL(ret)) {
@ -358,7 +358,7 @@ int ObLSMemberTable::on_commit_remove_tablets(const obrpc::ObBatchRemoveTabletAr
if (OB_FAIL(tablet_svr->on_commit_remove_tablets(*arg, trans_flags))) {
LOG_WARN("fail to on_commit_remove_tablets", KR(ret), KPC(arg), K(trans_flags));
} else {
ls->get_tablet_gc_handler()->set_tablet_gc_trigger();
ls->get_tablet_gc_handler()->set_tablet_persist_trigger();
}
} else if (OB_FAIL(tablet_svr->on_abort_remove_tablets(*arg, trans_flags))) {
LOG_WARN("fail to on_abort_remove_tablets", KR(ret), KPC(arg), K(trans_flags));

View File

@ -450,7 +450,6 @@ int ObTabletGCHandler::offline()
void ObTabletGCHandler::online()
{
set_tablet_persist_trigger();
set_tablet_gc_trigger();
set_start();
STORAGE_LOG(INFO, "tablet gc handler online", KPC(this), KPC(ls_), K(ls_->get_ls_meta()));
}

View File

@ -28,6 +28,7 @@ namespace checkpoint
class ObTabletGCHandler
{
friend class ObTabletGCService;
public:
ObTabletGCHandler()
: ls_(NULL),
@ -50,7 +51,6 @@ public:
static bool is_tablet_gc_trigger(uint8_t tablet_persist_trigger)
{ return 0 != (tablet_persist_trigger & 2); }
void set_tablet_persist_trigger();
void set_tablet_gc_trigger();
uint8_t get_tablet_persist_trigger_and_reset();
int get_unpersist_tablet_ids(common::ObTabletIDArray &unpersist_create_tablet_ids,
bool only_deleted = false);
@ -71,6 +71,7 @@ private:
bool is_finish() { obsys::ObWLockGuard lock(wait_lock_, false); return lock.acquired(); }
void set_stop() { ATOMIC_STORE(&update_enabled_, false); }
void set_start() { ATOMIC_STORE(&update_enabled_, true); }
void set_tablet_gc_trigger();
public:
obsys::ObRWLock wait_lock_;