Merge branch 'pr_1545'
This commit is contained in:
@ -489,7 +489,7 @@ int ObDASTabletMapper::get_all_tablet_and_object_id(ObIArray<ObTabletID> &tablet
|
|||||||
if (OB_NOT_NULL(table_schema_)) {
|
if (OB_NOT_NULL(table_schema_)) {
|
||||||
if (!table_schema_->is_partitioned_table()) {
|
if (!table_schema_->is_partitioned_table()) {
|
||||||
if (OB_FAIL(get_non_partition_tablet_id(tablet_ids, out_part_ids))) {
|
if (OB_FAIL(get_non_partition_tablet_id(tablet_ids, out_part_ids))) {
|
||||||
LOG_WARN("get non partitino tablet id failed", K(ret));
|
LOG_WARN("get non partition tablet id failed", K(ret));
|
||||||
}
|
}
|
||||||
} else if (PARTITION_LEVEL_ONE == table_schema_->get_part_level()) {
|
} else if (PARTITION_LEVEL_ONE == table_schema_->get_part_level()) {
|
||||||
if (OB_FAIL(get_all_tablet_and_object_id(PARTITION_LEVEL_ONE, OB_INVALID_ID,
|
if (OB_FAIL(get_all_tablet_and_object_id(PARTITION_LEVEL_ONE, OB_INVALID_ID,
|
||||||
@ -894,7 +894,7 @@ int ObDASLocationRouter::nonblock_get_candi_tablet_locations(const ObDASTableLoc
|
|||||||
candi_tablet_locs.reset();
|
candi_tablet_locs.reset();
|
||||||
int64_t N = tablet_ids.count();
|
int64_t N = tablet_ids.count();
|
||||||
if (OB_FAIL(candi_tablet_locs.prepare_allocate(N))) {
|
if (OB_FAIL(candi_tablet_locs.prepare_allocate(N))) {
|
||||||
LOG_WARN("Partitoin location list prepare error", K(ret));
|
LOG_WARN("Partition location list prepare error", K(ret));
|
||||||
} else {
|
} else {
|
||||||
ObLSLocation location;
|
ObLSLocation location;
|
||||||
int64_t i = 0;
|
int64_t i = 0;
|
||||||
|
|||||||
@ -28,7 +28,7 @@ bool ObRowKeyCompare::operator()(const ObRowkey *left, const ObRowkey *right)
|
|||||||
} else if (OB_UNLIKELY(NULL == left)
|
} else if (OB_UNLIKELY(NULL == left)
|
||||||
|| OB_UNLIKELY(NULL == right)) {
|
|| OB_UNLIKELY(NULL == right)) {
|
||||||
result_code_ = common::OB_INVALID_ARGUMENT;
|
result_code_ = common::OB_INVALID_ARGUMENT;
|
||||||
LOG_WARN_RET(result_code_, "Invaid argument, ", KP(left), KP(right), K_(result_code));
|
LOG_WARN_RET(result_code_, "Invalid argument, ", KP(left), KP(right), K_(result_code));
|
||||||
} else {
|
} else {
|
||||||
bool_ret = (*left) < (*right);
|
bool_ret = (*left) < (*right);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,7 +212,7 @@ int ObDASUpdIterator::get_next_spatial_index_row(ObNewRow *&row)
|
|||||||
}
|
}
|
||||||
} else if (OB_ISNULL(spatial_rows)) {
|
} else if (OB_ISNULL(spatial_rows)) {
|
||||||
if (OB_FAIL(create_spatial_index_store())) {
|
if (OB_FAIL(create_spatial_index_store())) {
|
||||||
LOG_WARN("create spatila index rows store failed", K(ret));
|
LOG_WARN("create spatial index rows store failed", K(ret));
|
||||||
} else {
|
} else {
|
||||||
spatial_rows = get_spatial_index_rows();
|
spatial_rows = get_spatial_index_rows();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -344,7 +344,7 @@ int ObDASUtils::generate_spatial_index_rows(
|
|||||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||||
LOG_WARN("failed to alloc memory for spatial index row mbr", K(ret));
|
LOG_WARN("failed to alloc memory for spatial index row mbr", K(ret));
|
||||||
} else if (OB_FAIL(spa_mbr.to_char(mbr, mbr_len))) {
|
} else if (OB_FAIL(spa_mbr.to_char(mbr, mbr_len))) {
|
||||||
LOG_WARN("failed transfrom ObSpatialMBR to string", K(ret));
|
LOG_WARN("failed transform ObSpatialMBR to string", K(ret));
|
||||||
} else {
|
} else {
|
||||||
for (uint64_t i = 0; OB_SUCC(ret) && i < cellids.size(); i++) {
|
for (uint64_t i = 0; OB_SUCC(ret) && i < cellids.size(); i++) {
|
||||||
if (OB_ISNULL(obj_arr = reinterpret_cast<ObObj *>(allocator.alloc(sizeof(ObObj) * rowkey_num)))) {
|
if (OB_ISNULL(obj_arr = reinterpret_cast<ObObj *>(allocator.alloc(sizeof(ObObj) * rowkey_num)))) {
|
||||||
|
|||||||
@ -768,7 +768,7 @@ int ObRemoteBaseExecuteP<T>::base_before_response(common::ObScanner &scanner)
|
|||||||
} else {
|
} else {
|
||||||
LOG_TRACE("get trans_result",
|
LOG_TRACE("get trans_result",
|
||||||
"cur_stmt", session->get_current_query_string(),
|
"cur_stmt", session->get_current_query_string(),
|
||||||
"scanner_trans_rsult", scanner.get_trans_result(),
|
"scanner_trans_result", scanner.get_trans_result(),
|
||||||
"tx_desc", *session->get_tx_desc());
|
"tx_desc", *session->get_tx_desc());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -678,7 +678,7 @@ int ObSqlTransControl::stmt_setup_snapshot_(ObSQLSessionInfo *session,
|
|||||||
} else {
|
} else {
|
||||||
snapshot.init_weak_read(snapshot_version);
|
snapshot.init_weak_read(snapshot_version);
|
||||||
}
|
}
|
||||||
// 1) acquire snapshot verison when insert operator is executed
|
// 1) acquire snapshot version when insert operator is executed
|
||||||
// 2) don't resolve RR and SERIALIZABLE isolation scenario temporarily, because of remote stmt plan
|
// 2) don't resolve RR and SERIALIZABLE isolation scenario temporarily, because of remote stmt plan
|
||||||
} else if (plan->is_plain_insert()
|
} else if (plan->is_plain_insert()
|
||||||
&& session->get_tx_isolation() != ObTxIsolationLevel::SERIAL
|
&& session->get_tx_isolation() != ObTxIsolationLevel::SERIAL
|
||||||
|
|||||||
@ -157,7 +157,7 @@ int ObPlanCacheObject::check_pre_calc_cons(const bool is_ignore_stmt,
|
|||||||
ObSEArray<ObDatumObjParam, 4> datum_params;
|
ObSEArray<ObDatumObjParam, 4> datum_params;
|
||||||
if (OB_ISNULL(phy_plan_ctx)) {
|
if (OB_ISNULL(phy_plan_ctx)) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
LOG_WARN("invalid phyiscal plan ctx", K(ret), K(phy_plan_ctx));
|
LOG_WARN("invalid physical plan ctx", K(ret), K(phy_plan_ctx));
|
||||||
} else if (OB_FALSE_IT(phy_plan_ctx->set_ignore_stmt(is_ignore_stmt))) {
|
} else if (OB_FALSE_IT(phy_plan_ctx->set_ignore_stmt(is_ignore_stmt))) {
|
||||||
} else if (PRE_CALC_ERROR == expect_res) {
|
} else if (PRE_CALC_ERROR == expect_res) {
|
||||||
if (OB_FAIL(pre_calc_frame.eval_expect_err(exec_ctx, is_match))) {
|
if (OB_FAIL(pre_calc_frame.eval_expect_err(exec_ctx, is_match))) {
|
||||||
|
|||||||
@ -251,7 +251,7 @@ int ObPhyLocationGetter::reselect_duplicate_table_best_replica(const ObIArray<Ob
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
//need_check_on_same_server: out, 是否需要检查分区在同一sesrver, 如果这里检查过了就置为false
|
//need_check_on_same_server: out, 是否需要检查分区在同一server, 如果这里检查过了就置为false
|
||||||
int ObPhyLocationGetter::get_phy_locations(const ObIArray<ObTableLocation> &table_locations,
|
int ObPhyLocationGetter::get_phy_locations(const ObIArray<ObTableLocation> &table_locations,
|
||||||
const ObPlanCacheCtx &pc_ctx,
|
const ObPlanCacheCtx &pc_ctx,
|
||||||
ObIArray<ObCandiTableLoc> &candi_table_locs,
|
ObIArray<ObCandiTableLoc> &candi_table_locs,
|
||||||
@ -295,7 +295,7 @@ int ObPhyLocationGetter::get_phy_locations(const ObIArray<ObTableLocation> &tabl
|
|||||||
candi_table_loc.set_duplicate_type(table_location.get_duplicate_type());
|
candi_table_loc.set_duplicate_type(table_location.get_duplicate_type());
|
||||||
candi_table_loc.set_table_location_key(
|
candi_table_loc.set_table_location_key(
|
||||||
table_location.get_table_id(), table_location.get_ref_table_id());
|
table_location.get_table_id(), table_location.get_ref_table_id());
|
||||||
LOG_DEBUG("plan cache utitl", K(candi_table_loc));
|
LOG_DEBUG("plan cache util", K(candi_table_loc));
|
||||||
}
|
}
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
if (OB_FAIL(table_location_ptrs.push_back(&table_location))) {
|
if (OB_FAIL(table_location_ptrs.push_back(&table_location))) {
|
||||||
|
|||||||
@ -277,7 +277,7 @@ int ObPlanSet::match_param_info(const ObParamInfo ¶m_info,
|
|||||||
is_same = false;
|
is_same = false;
|
||||||
} else {
|
} else {
|
||||||
// number params in point and st_point can ignore scale check to share plancache
|
// number params in point and st_point can ignore scale check to share plancache
|
||||||
// please refrer to ObSqlParameterization::is_ignore_scale_check
|
// please refer to ObSqlParameterization::is_ignore_scale_check
|
||||||
is_same = param_info.flag_.ignore_scale_check_
|
is_same = param_info.flag_.ignore_scale_check_
|
||||||
? true
|
? true
|
||||||
: (param.get_scale() == param_info.scale_);
|
: (param.get_scale() == param_info.scale_);
|
||||||
@ -734,7 +734,7 @@ int ObPlanSet::init_new_set(const ObPlanCacheCtx &pc_ctx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// init const param constriants
|
// init const param constraints
|
||||||
ObPlanSetType ps_t = get_plan_set_type_by_cache_obj_type(plan.get_ns());
|
ObPlanSetType ps_t = get_plan_set_type_by_cache_obj_type(plan.get_ns());
|
||||||
if (PST_PRCD == ps_t) {
|
if (PST_PRCD == ps_t) {
|
||||||
// pl does not have any const param constraint
|
// pl does not have any const param constraint
|
||||||
@ -928,7 +928,7 @@ int ObPlanSet::match_cons(const ObPlanCacheCtx &pc_ctx, bool &is_matched)
|
|||||||
OB_ISNULL(equal_cons)) {
|
OB_ISNULL(equal_cons)) {
|
||||||
is_matched = false;
|
is_matched = false;
|
||||||
ret = OB_INVALID_ARGUMENT;
|
ret = OB_INVALID_ARGUMENT;
|
||||||
LOG_WARN("invalid arugment", K(param_cons), K(possible_param_cons), K(equal_cons));
|
LOG_WARN("invalid argument", K(param_cons), K(possible_param_cons), K(equal_cons));
|
||||||
} else if (param_cons->count() != all_plan_const_param_constraints_.count() ||
|
} else if (param_cons->count() != all_plan_const_param_constraints_.count() ||
|
||||||
possible_param_cons->count() != all_possible_const_param_constraints_.count() ||
|
possible_param_cons->count() != all_possible_const_param_constraints_.count() ||
|
||||||
equal_cons->count() != all_equal_param_constraints_.count() ||
|
equal_cons->count() != all_equal_param_constraints_.count() ||
|
||||||
@ -1082,7 +1082,7 @@ int ObPlanSet::init_pre_calc_exprs(const ObPlanCacheObject &phy_plan,
|
|||||||
void *buf = NULL;
|
void *buf = NULL;
|
||||||
|
|
||||||
if (phy_plan.get_pre_calc_frames().get_size() == 0) {
|
if (phy_plan.get_pre_calc_frames().get_size() == 0) {
|
||||||
// have no pre calculable expression, not initalize pre calculable expression handle.
|
// have no pre calculable expression, not initialize pre calculable expression handle.
|
||||||
pre_cal_expr_handler_ = NULL;
|
pre_cal_expr_handler_ = NULL;
|
||||||
} else if (OB_ISNULL(pc_alloc_)) {
|
} else if (OB_ISNULL(pc_alloc_)) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
@ -1204,7 +1204,7 @@ int ObSqlPlanSet::add_plan(ObPhysicalPlan &plan,
|
|||||||
candi_table_locs))) {
|
candi_table_locs))) {
|
||||||
LOG_WARN("fail to get physical locations", K(ret));
|
LOG_WARN("fail to get physical locations", K(ret));
|
||||||
} else if (OB_FAIL(set_concurrent_degree(outline_param_idx, plan))) {
|
} else if (OB_FAIL(set_concurrent_degree(outline_param_idx, plan))) {
|
||||||
LOG_WARN("fail to check oncurrent degree", K(ret));
|
LOG_WARN("fail to check concurrent degree", K(ret));
|
||||||
} else {
|
} else {
|
||||||
if (pc_ctx.exec_ctx_.get_physical_plan_ctx()->get_or_expand_transformed()) {
|
if (pc_ctx.exec_ctx_.get_physical_plan_ctx()->get_or_expand_transformed()) {
|
||||||
need_try_plan_ |= TRY_PLAN_OR_EXPAND;
|
need_try_plan_ |= TRY_PLAN_OR_EXPAND;
|
||||||
@ -1654,7 +1654,7 @@ int ObSqlPlanSet::get_physical_plan(const ObPhyPlanType plan_type,
|
|||||||
LOG_WARN("invalid plan type", K(ret), K(plan_type));
|
LOG_WARN("invalid plan type", K(ret), K(plan_type));
|
||||||
} else if (OB_PHY_PLAN_LOCAL == plan_type) {
|
} else if (OB_PHY_PLAN_LOCAL == plan_type) {
|
||||||
if (OB_FAIL(try_get_local_evolution_plan(pc_ctx, plan, get_next))) {
|
if (OB_FAIL(try_get_local_evolution_plan(pc_ctx, plan, get_next))) {
|
||||||
LOG_WARN("failed to try get local evloution plan", K(ret));
|
LOG_WARN("failed to try get local evolution plan", K(ret));
|
||||||
} else if (get_next) {
|
} else if (get_next) {
|
||||||
plan = local_plan_;
|
plan = local_plan_;
|
||||||
}
|
}
|
||||||
@ -1663,7 +1663,7 @@ int ObSqlPlanSet::get_physical_plan(const ObPhyPlanType plan_type,
|
|||||||
}
|
}
|
||||||
} else if (OB_PHY_PLAN_DISTRIBUTED == plan_type) {
|
} else if (OB_PHY_PLAN_DISTRIBUTED == plan_type) {
|
||||||
if (OB_FAIL(try_get_dist_evolution_plan(pc_ctx, plan, get_next))) {
|
if (OB_FAIL(try_get_dist_evolution_plan(pc_ctx, plan, get_next))) {
|
||||||
LOG_WARN("failed to try get local evloution plan", K(ret));
|
LOG_WARN("failed to try get local evolution plan", K(ret));
|
||||||
} else if (get_next && OB_FAIL(dist_plans_.get_plan(pc_ctx, plan))) {
|
} else if (get_next && OB_FAIL(dist_plans_.get_plan(pc_ctx, plan))) {
|
||||||
LOG_TRACE("failed to get dist plan", K(ret));
|
LOG_TRACE("failed to get dist plan", K(ret));
|
||||||
}
|
}
|
||||||
@ -2027,7 +2027,7 @@ void ObSqlPlanSet::reset()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//get plan used
|
//get plan used
|
||||||
//need_check_on_same_server: out, 是否需要检查分区在同一sesrver, 如果里面检查过且不在同一server则置为false
|
//need_check_on_same_server: out, 是否需要检查分区在同一server, 如果里面检查过且不在同一server则置为false
|
||||||
int ObSqlPlanSet::get_phy_locations(const ObIArray<ObTableLocation> &table_locations,
|
int ObSqlPlanSet::get_phy_locations(const ObIArray<ObTableLocation> &table_locations,
|
||||||
ObPlanCacheCtx &pc_ctx,
|
ObPlanCacheCtx &pc_ctx,
|
||||||
ObIArray<ObCandiTableLoc> &candi_table_locs,
|
ObIArray<ObCandiTableLoc> &candi_table_locs,
|
||||||
@ -2198,7 +2198,7 @@ int ObSqlPlanSet::is_partition_in_same_server(const ObIArray<ObCandiTableLoc> &c
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
SQL_PC_LOG(WARN, "there is no partition_locattion in this phy_location",
|
SQL_PC_LOG(WARN, "there is no partition_location in this phy_location",
|
||||||
K(candi_table_locs.at(i)));
|
K(candi_table_locs.at(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user