fix bug select for update ... skip locked can't execute parallen

This commit is contained in:
yishenglanlingzui
2023-07-28 03:18:10 +00:00
committed by ob-robot
parent f15a12aa7c
commit fbce1c5965
2 changed files with 7 additions and 2 deletions

View File

@ -89,7 +89,7 @@ int ObLogForUpdate::compute_sharding_info()
} else if (OB_ISNULL(get_sharding())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(ret));
} else {
} else {
is_partition_wise_ = !is_multi_part_dml_ && !child->is_exchange_allocated() &&
get_sharding()->is_distributed() &&
NULL != get_sharding()->get_phy_table_location_info();
@ -109,7 +109,7 @@ int ObLogForUpdate::allocate_granule_post(AllocGIContext &ctx)
if (OB_ISNULL(get_plan())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(ret));
} else if (OB_FAIL(pw_allocate_granule_post(ctx))){ // 分配完GI以后,会对ctx的状态进行清理
} else if (OB_FAIL(pw_allocate_granule_post(ctx))) { // 分配完GI以后,会对ctx的状态进行清理
LOG_WARN("failed to allocate pw gi post", K(ret));
} else {
if (is_partition_wise_state && ctx.is_op_set_pw(this)) {

View File

@ -12841,9 +12841,14 @@ int ObLogPlan::create_for_update_plan(ObLogicalOperator *&top,
int ret = OB_SUCCESS;
bool is_multi_part_dml = false;
bool is_result_local = false;
ObExchangeInfo exch_info;
if (OB_ISNULL(top) || OB_ISNULL(get_stmt())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(ret));
} else if (skip_locked &&
top->is_distributed() &&
OB_FAIL(allocate_exchange_as_top(top, exch_info))) {
LOG_WARN("fail to allocate exchange op", K(ret), K(skip_locked));
} else if (OB_FAIL(check_need_multi_partition_dml(*get_stmt(),
*top,
index_dml_infos,