From 287987fb8a1f6de05ce1f68aeb772e20d2951999 Mon Sep 17 00:00:00 2001 From: csch Date: Thu, 1 Dec 2022 15:55:39 +0800 Subject: [PATCH 01/13] fix some typo error --- .gitignore | 3 ++ src/sql/optimizer/ob_join_order.cpp | 44 +++++++++++------------ src/sql/optimizer/ob_opt_est_cost_model.h | 2 +- src/sql/optimizer/ob_route_policy.cpp | 2 +- src/sql/optimizer/ob_select_log_plan.cpp | 36 +++++++++---------- 5 files changed, 45 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index 59275ebb1d..3b9540bc14 100644 --- a/.gitignore +++ b/.gitignore @@ -345,3 +345,6 @@ deps/3rd ############# test ############# test/tmp test/var + +single_ob2 +store diff --git a/src/sql/optimizer/ob_join_order.cpp b/src/sql/optimizer/ob_join_order.cpp index 1e51a86930..92b404e09f 100644 --- a/src/sql/optimizer/ob_join_order.cpp +++ b/src/sql/optimizer/ob_join_order.cpp @@ -3064,7 +3064,7 @@ int ObJoinOrder::check_expr_overlap_index(const ObRawExpr* qual, return ret; } -/* 拿到quals中涉及的 column的列的id 这个函数在抽取不出query range和 intersting order的情况下调用 */ +/* 拿到quals中涉及的 column的列的id 这个函数在抽取不出query range和 interesting order的情况下调用 */ int ObJoinOrder::extract_filter_column_ids(const ObIArray &quals, const bool is_data_table, const ObTableSchema &index_schema, @@ -3307,7 +3307,7 @@ int ObJoinOrder::get_candi_range_expr(const ObIArray &range_columns, std::sort(sorted_predicates.begin(), sorted_predicates.end(), compare_op); LOG_TRACE("sort predicates and calc cost", K(min_cost), K(sorted_predicates)); } - //for earch candi range expr, check scan cost + //for each candi range expr, check scan cost for (int64_t i = 0; OB_SUCC(ret) && has_in_pred && i < sorted_predicates.count(); ++i) { CandiRangeExprs *candi_exprs = sorted_predicates.at(i); ObRawExpr *min_cost_in_expr = NULL; @@ -4279,7 +4279,7 @@ int ObJoinOrder::add_path(Path* path) path->contain_match_all_fake_cte() && !path->is_remote()) { should_add = false; - OPT_TRACE("containt match all fake cte, but not remote path, will not add path"); + OPT_TRACE("contain match all fake cte, but not remote path, will not add path"); } for (int64_t i = interesting_paths_.count() - 1; OB_SUCC(ret) && should_add && i >= 0; --i) { Path *cur_path = interesting_paths_.at(i); @@ -4423,13 +4423,13 @@ int ObJoinOrder::compute_path_relationship(const Path &first_path, OPT_TRACE("the sharding of the two paths is equal"); } else if (temp_relation == DominateRelation::OBJ_LEFT_DOMINATE) { left_dominated_count++; - OPT_TRACE("left path dominate right path beacuse of sharding"); + OPT_TRACE("left path dominate right path because of sharding"); if (right_dominated_count > 0) { relation = DominateRelation::OBJ_UNCOMPARABLE; } } else if (temp_relation == DominateRelation::OBJ_RIGHT_DOMINATE) { right_dominated_count++; - OPT_TRACE("right path dominate left path beacuse of sharding"); + OPT_TRACE("right path dominate left path because of sharding"); if (left_dominated_count > 0) { relation = DominateRelation::OBJ_UNCOMPARABLE; } @@ -4450,12 +4450,12 @@ int ObJoinOrder::compute_path_relationship(const Path &first_path, OPT_TRACE("both path is pipeline"); } else if (temp_relation == DominateRelation::OBJ_LEFT_DOMINATE) { left_dominated_count++; - OPT_TRACE("left path dominate right path beacuse of pipeline"); + OPT_TRACE("left path dominate right path because of pipeline"); if (right_dominated_count > 0) { relation = DominateRelation::OBJ_UNCOMPARABLE; } } else if (temp_relation == DominateRelation::OBJ_RIGHT_DOMINATE) { - OPT_TRACE("right path dominate left path beacuse of pipeline"); + OPT_TRACE("right path dominate left path because of pipeline"); right_dominated_count++; if (left_dominated_count > 0) { relation = DominateRelation::OBJ_UNCOMPARABLE; @@ -4483,12 +4483,12 @@ int ObJoinOrder::compute_path_relationship(const Path &first_path, OPT_TRACE("the interesting order of the two paths is equal"); } else if (temp_relation == DominateRelation::OBJ_LEFT_DOMINATE) { left_dominated_count++; - OPT_TRACE("left path dominate right path beacuse of interesting order"); + OPT_TRACE("left path dominate right path because of interesting order"); if (right_dominated_count > 0) { relation = DominateRelation::OBJ_UNCOMPARABLE; } } else if (temp_relation == DominateRelation::OBJ_RIGHT_DOMINATE) { - OPT_TRACE("right path dominate left path beacuse of interesting order"); + OPT_TRACE("right path dominate left path because of interesting order"); right_dominated_count++; if (left_dominated_count > 0) { relation = DominateRelation::OBJ_UNCOMPARABLE; @@ -5610,7 +5610,7 @@ int JoinPath::compute_join_path_ordering() if (!is_left_need_sort()) { set_interesting_order_info(left_path_->get_interesting_order_info()); if(OB_FAIL(append(ordering_, left_path_->ordering_))) { - LOG_WARN("failed to append join orderign", K(ret)); + LOG_WARN("failed to append join ordering", K(ret)); } else if (OB_FAIL(parent_->check_join_interesting_order(this))) { LOG_WARN("failed to update join interesting order info", K(ret)); } else { @@ -6664,7 +6664,7 @@ int JoinPath::cost_hash_join(int64_t join_parallel, right_rows /= in_parallel; } else if (DistAlgo::DIST_BC2HOST_NONE == join_dist_algo_) { // only for shared hash join - // right_rows is same as the impelentation of DIST_BROADCAST_NONE + // right_rows is same as the implementation of DIST_BROADCAST_NONE // left_rows is left_rows / parallel * server right_rows /= in_parallel; left_rows = left_rows / in_parallel * server_cnt_; @@ -9363,7 +9363,7 @@ int ObJoinOrder::find_minimal_cost_merge_path(const Path &left_path, DistAlgo::DIST_BASIC_METHOD == join_dist_algo) && left_merge_key.need_sort_ && right_need_sort && prune_mj) { // do nothing - OPT_TRACE("prune merge join,beacuse both left and right path need sort"); + OPT_TRACE("prune merge join,because both left and right path need sort"); } else if (OB_FAIL(JoinPath::compute_join_path_parallel_and_server_info(opt_ctx.get_local_server_addr(), &left_path, right_path, @@ -10274,7 +10274,7 @@ int ObJoinOrder::remove_invalid_join_filter_infos(ObIArray &join for (int i = 0; OB_SUCC(ret) && i < join_filter_infos.count(); ++i) { if (!join_filter_infos.at(i).can_use_join_filter_ && !join_filter_infos.at(i).need_partition_join_filter_) { - //do nothong + //do nothing } else if (OB_FAIL(new_infos.push_back(join_filter_infos.at(i)))) { LOG_WARN("failed to push back join filter info", K(ret)); } @@ -10351,7 +10351,7 @@ int ObJoinOrder::create_and_add_mj_path(const Path *left_path, } else if (OB_FAIL(append(join_path->right_sort_keys_, right_sort_keys))) { LOG_WARN("failed to append right expected ordering", K(ret)); } else if (OB_FAIL(append(join_path->merge_directions_, merge_directions))) { - LOG_WARN("faield to append merge directions", K(ret)); + LOG_WARN("failed to append merge directions", K(ret)); } else if (OB_FAIL(join_path->compute_join_path_property())) { LOG_WARN("failed to compute join path property", K(ret)); } else if (OB_FAIL(create_subplan_filter_for_join_path(join_path, @@ -10461,7 +10461,7 @@ int ObJoinOrder::classify_hashjoin_conditions(const ObJoinOrder &left_tree, other_join_conditions, join_type, naaj_info))) { - LOG_WARN("failed to extract hash join condtiions and filters", K(join_type), K(ret)); + LOG_WARN("failed to extract hash join conditions and filters", K(join_type), K(ret)); } else if (IS_OUTER_OR_CONNECT_BY_JOIN(join_type) && OB_FAIL(append(filters, where_filters))) { LOG_WARN("failed to append join quals", K(ret)); @@ -10684,7 +10684,7 @@ int ObJoinOrder::is_onetime_expr(const ObRelIds &ignore_relids,ObRawExpr* expr, ret = OB_ERR_UNEXPECTED; LOG_WARN("expr is null", K(ret)); } else { - // if a expr contain psedu column, hierachical expr, any column + // if a expr contain psedu column, hierarchical expr, any column is_valid = !ObOptimizerUtil::has_psedu_column(*expr) && !ObOptimizerUtil::has_hierarchical_expr(*expr) && @@ -10735,7 +10735,7 @@ int ObJoinOrder::create_onetime_expr(const ObRelIds &ignore_relids, ObRawExpr* & ObExecParamRawExpr *new_expr = NULL; ObRawExprFactory &expr_factory = get_plan()->get_optimizer_context().get_expr_factory(); if (OB_FAIL(expr_factory.create_raw_expr(T_QUESTIONMARK, new_expr))) { - LOG_WARN("faield to create exec param expr", K(ret)); + LOG_WARN("failed to create exec param expr", K(ret)); } else if (OB_ISNULL(new_expr)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("new expr is null", K(ret), K(new_expr)); @@ -11201,7 +11201,7 @@ int ObJoinOrder::get_simple_index_info(const uint64_t table_id, /** * prefix_filters: 影响query_range range范围的filter * pushdown prefix filters: push down filters that can contribute query range - * posfix_filters: filters that can be evaluated on index + * postfix_filters: filters that can be evaluated on index * table_filters: filters that can be evaluated after index back */ int ObJoinOrder::fill_filters(const ObIArray &all_filters, @@ -11529,7 +11529,7 @@ int ObJoinOrder::fill_path_index_meta_info(const uint64_t table_id, } else if (OB_ISNULL(get_plan()) || OB_ISNULL(schema_guard = OPT_CTX.get_sql_schema_guard())) { ret = OB_INVALID_ARGUMENT; - LOG_WARN("nulll point error", K(schema_guard), K(get_plan()), K(ret)); + LOG_WARN("null point error", K(schema_guard), K(get_plan()), K(ret)); } for (int64_t i = 0; OB_SUCC(ret) && i < access_paths.count(); ++i) { AccessPath *ap = access_paths.at(i); @@ -12289,7 +12289,7 @@ int ObJoinOrder::calc_join_output_rows(ObLogPlan *plan, } } if (OB_SUCC(ret)) { - // although we compute join row count as anti join, but here selectivity is trated as join + // although we compute join row count as anti join, but here selectivity is treated as join // selectivity. So refine selectivity as output_row / (left_row * right_row) selectivity = new_rows / (left_output_rows * right_output_rows); } @@ -13534,7 +13534,7 @@ int ObJoinOrder::extract_pushdown_quals(const ObIArray &quals, ObRawExpr *qual = quals.at(i); if (OB_ISNULL(qual)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("get unexplected null", K(qual), K(ret)); + LOG_WARN("get unexpected null", K(qual), K(ret)); // can not push down expr with subquery } else if (qual->has_flag(CNT_PSEUDO_COLUMN) || qual->has_flag(CNT_PRIOR) || @@ -13743,7 +13743,7 @@ int ObJoinOrder::deduce_prefix_str_idx_exprs(ObRawExpr *expr, type, new_expr, helper))) { - LOG_WARN("get_prefix str idx exprs faield", K(ret)); + LOG_WARN("get_prefix str idx exprs failed", K(ret)); } else { //do nothing } diff --git a/src/sql/optimizer/ob_opt_est_cost_model.h b/src/sql/optimizer/ob_opt_est_cost_model.h index 39fe8b54c4..79cd376bcd 100644 --- a/src/sql/optimizer/ob_opt_est_cost_model.h +++ b/src/sql/optimizer/ob_opt_est_cost_model.h @@ -117,7 +117,7 @@ struct ObIndexMetaInfo uint64_t index_id_; // index id int64_t index_micro_block_size_; //index micro block size, same as main table when path is primary uint64_t index_part_count_; - double index_part_size_; //index table partitoin(0) data size, same as main table when path is primary + double index_part_size_; //index table partition(0) data size, same as main table when path is primary int64_t index_column_count_; //index column count bool is_index_back_; // is index back bool is_unique_index_; // is unique index diff --git a/src/sql/optimizer/ob_route_policy.cpp b/src/sql/optimizer/ob_route_policy.cpp index c41eb5a7db..97510f5a6d 100644 --- a/src/sql/optimizer/ob_route_policy.cpp +++ b/src/sql/optimizer/ob_route_policy.cpp @@ -209,7 +209,7 @@ int ObRoutePolicy::get_server_locality(const ObAddr &addr, const ObServerLocality &cur_locality = server_locality_array.at(i); if (addr == cur_locality.get_addr()) { if (OB_FAIL(svr_locality.assign(cur_locality))) { - LOG_WARN("fail to assgin locality", K(addr), K(cur_locality), K(server_locality_array), K(ret)); + LOG_WARN("fail to assign locality", K(addr), K(cur_locality), K(server_locality_array), K(ret)); } else { is_found = true; } diff --git a/src/sql/optimizer/ob_select_log_plan.cpp b/src/sql/optimizer/ob_select_log_plan.cpp index a7f4345ff2..19b10dcbc9 100644 --- a/src/sql/optimizer/ob_select_log_plan.cpp +++ b/src/sql/optimizer/ob_select_log_plan.cpp @@ -203,7 +203,7 @@ int ObSelectLogPlan::get_groupby_rollup_exprs(const ObLogicalOperator *top, top->get_output_equal_sets(), group_directions))) { } else if (OB_FAIL(rollup_exprs.assign(stmt->get_rollup_exprs()))) { - LOG_WARN("failed to assign to rollop exprs.", K(ret)); + LOG_WARN("failed to assign to rollup exprs.", K(ret)); } else if (rollup_exprs.count() > 0) { bool has_rollup_dir = stmt->has_rollup_dir(); if (OB_UNLIKELY(has_rollup_dir && (stmt->get_rollup_dir_size() != rollup_exprs.count()))) { @@ -1065,10 +1065,10 @@ int ObSelectLogPlan::inner_create_merge_group_plan(const ObIArray &r } else if (top->is_distributed() && OB_FAIL(top->check_sharding_compatible_with_reduce_expr(reduce_exprs, is_partition_wise))) { - LOG_WARN("failed to check if sharding compatiable with reduce expr", K(ret)); + LOG_WARN("failed to check if sharding compatible with reduce expr", K(ret)); } else if (!top->is_distributed() || is_partition_wise) { if (OB_FAIL(try_allocate_sort_as_top(top, sort_keys, need_sort, prefix_pos, part_cnt))) { - LOG_WARN("failed to allcoate sort as top", K(ret)); + LOG_WARN("failed to allocate sort as top", K(ret)); } else if (OB_FAIL(allocate_group_by_as_top(top, MERGE_AGGREGATE, adjusted_group_by_exprs, @@ -1116,7 +1116,7 @@ int ObSelectLogPlan::inner_create_merge_group_plan(const ObIArray &r nullptr, is_fetch_with_ties, use_part_sort ? &hash_sortkey : NULL))) { - LOG_WARN("failed to allcoate sort as top", K(ret)); + LOG_WARN("failed to allocate sort as top", K(ret)); } else if (OB_FAIL(allocate_group_by_as_top(top, MERGE_AGGREGATE, sort_exprs, @@ -1614,7 +1614,7 @@ int ObSelectLogPlan::create_merge_distinct_plan(ObLogicalOperator *&top, } else if (top->is_distributed() && OB_FAIL(top->check_sharding_compatible_with_reduce_expr(reduce_exprs, is_partition_wise))) { - LOG_WARN("failed to check sharding compatiable with reduce exprs", K(ret)); + LOG_WARN("failed to check sharding compatible with reduce exprs", K(ret)); } else if (!top->is_distributed() || is_partition_wise) { OPT_TRACE("is basic distinct:", !top->is_distributed()); OPT_TRACE("is partition wise distinct", is_partition_wise); @@ -2118,7 +2118,7 @@ int ObSelectLogPlan::create_union_all_plan(const ObIArray &c //for union all to keep child branches execute serially from left to right set_dist_methods &= (DistAlgo::DIST_PULL_TO_LOCAL | DistAlgo::DIST_BASIC_METHOD); } - OPT_TRACE("start create unoin all plan"); + OPT_TRACE("start create union all plan"); if (OB_SUCC(ret) && (set_dist_methods & DistAlgo::DIST_BASIC_METHOD)) { bool is_basic = false; OPT_TRACE("check match basic method"); @@ -4380,7 +4380,7 @@ int ObSelectLogPlan::allocate_plan_top() // step. allocate 'group-by' if needed if (OB_SUCC(ret) && (select_stmt->has_group_by() || select_stmt->has_rollup())) { // group-by or rollup both allocate group by logical operator. - // mysql mode for update need allocate before group by becauese group by isn't pk preserving. + // mysql mode for update need allocate before group by because group by isn't pk preserving. if (lib::is_mysql_mode() && select_stmt->has_for_update()) { if (OB_FAIL(candi_allocate_for_update())) { LOG_WARN("failed to allocate for update operator", K(ret)); @@ -4393,7 +4393,7 @@ int ObSelectLogPlan::allocate_plan_top() if (OB_FAIL(candi_allocate_group_by())) { LOG_WARN("failed to allocate group-by operator", K(ret)); } else { - LOG_TRACE("succeed to allocate group-by opeartor", + LOG_TRACE("succeed to allocate group-by operator", K(candidates_.candidate_plans_.count())); } } @@ -4411,7 +4411,7 @@ int ObSelectLogPlan::allocate_plan_top() // step. allocate 'distinct' if needed if (OB_SUCC(ret) && select_stmt->has_distinct()) { - // mysql mode for update need allocate before distinct becauese distinct isn't pk preserving. + // mysql mode for update need allocate before distinct because distinct isn't pk preserving. if (lib::is_mysql_mode() && select_stmt->has_for_update() && !for_update_is_allocated) { if (OB_FAIL(candi_allocate_for_update())) { LOG_WARN("failed to allocate for update operator", K(ret)); @@ -4507,7 +4507,7 @@ int ObSelectLogPlan::allocate_plan_top() if (OB_FAIL(candi_allocate_select_into())) { LOG_WARN("failed to allocate select into operator", K(ret)); } else { - LOG_TRACE("succeed to allocate select into cluase", + LOG_TRACE("succeed to allocate select into clause", K(candidates_.candidate_plans_.count())); } } @@ -4590,7 +4590,7 @@ int ObSelectLogPlan::generate_raw_plan_for_expr_values() if (OB_FAIL(allocate_plan_top())) { LOG_WARN("failed to allocate top operators for expr select", K(ret)); } else { - LOG_TRACE("succeed to allcoate top operators for expr select", K(ret)); + LOG_TRACE("succeed to allocate top operators for expr select", K(ret)); } } } @@ -4638,7 +4638,7 @@ int ObSelectLogPlan::generate_child_plan_for_set(const ObDMLStmt *sub_stmt, (optimizer_context_.get_log_plan_factory().create(optimizer_context_, *sub_stmt)))) { ret = OB_ALLOCATE_MEMORY_FAILED; - LOG_ERROR("Failed to create logcial plan", K(sub_plan), K(ret)); + LOG_ERROR("Failed to create logical plan", K(sub_plan), K(ret)); } else if (FALSE_IT(sub_plan->set_is_parent_set_distinct(is_set_distinct))) { // do nothing } else if (OB_FAIL(sub_plan->add_pushdown_filters(pushdown_filters))) { @@ -5585,7 +5585,7 @@ int ObSelectLogPlan::get_sort_keys_for_window_function(const ObFdItemSet &fd_ite if (OB_FAIL(ret)) { } else if (OB_FAIL(append(output_sort_keys, win_expr->get_order_items()))) { - LOG_WARN("faield to append order items", K(ret)); + LOG_WARN("failed to append order items", K(ret)); } else if (OB_FAIL(ObOptimizerUtil::simplify_ordered_exprs(fd_item_set, equal_sets, const_exprs, @@ -6304,7 +6304,7 @@ int ObSelectLogPlan::create_pushdown_hash_dist_win_func(ObLogicalOperator *&top, NULL, false, // is_fetch_with_ties hash_sortkey))) { - LOG_WARN("failed to allcoate sort as top", K(ret)); + LOG_WARN("failed to allocate sort as top", K(ret)); } else if (OB_FAIL(allocate_window_function_as_top(WinDistAlgo::WIN_DIST_HASH, win_func_exprs, false, /* match_parallel */ @@ -6403,7 +6403,7 @@ int ObSelectLogPlan::sort_window_functions(const ObFdItemSet &fd_item_set, } } if (OB_SUCC(ret) && OB_FAIL(expr_entries.push_back(std::pair(-non_const_exprs, i)))) { - LOG_WARN("faield to push back expr entry", K(ret)); + LOG_WARN("failed to push back expr entry", K(ret)); } } if (OB_SUCC(ret)) { @@ -6736,7 +6736,7 @@ int ObSelectLogPlan::convert_project_columns(ObSelectStmt *stmt, expr->set_table_name(project_table_item->get_table_name()); if (expr->is_virtual_generated_column()) { if (item->is_geo_ == true && expr->get_srs_id() != SPATIAL_COLUMN_SRID_MASK) { - // spatial index generated column, cannot projet from main table + // spatial index generated column, cannot project from main table if (OB_FAIL(new_col_items.push_back(*item))) { LOG_WARN("failed to push back column item", K(ret)); } @@ -6910,7 +6910,7 @@ int ObSelectLogPlan::adjust_late_materialization_plan_structure(ObLogicalOperato right_expr, left_expr, equal_expr))) { - LOG_WARN("failed to crerate equal expr", K(ret)); + LOG_WARN("failed to create equal expr", K(ret)); } else if (OB_ISNULL(equal_expr)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("get unexpected null", K(ret)); @@ -7033,7 +7033,7 @@ int ObSelectLogPlan::generate_late_materialization_table_get(ObLogTableScan *ind LOG_WARN("failed to allocate table partition info", K(ret)); } else if (FALSE_IT(table_scan_part_info = new (table_scan_part_info) ObTablePartitionInfo(allocator))) { } else if (OB_FAIL(table_scan_part_info->assign(*index_scan_part_info))) { - LOG_WARN("failed to assigin table partition info", K(ret)); + LOG_WARN("failed to assign table partition info", K(ret)); } else { table_scan->set_index_back(false); table_scan->set_table_id(table_id); From 24a9d2d00463b8a527cabf98859f99f21b3f46c9 Mon Sep 17 00:00:00 2001 From: csch Date: Fri, 30 Dec 2022 16:42:20 +0800 Subject: [PATCH 02/13] fix some typo error --- src/sql/optimizer/ob_dynamic_sampling.cpp | 18 +++++++++--------- src/sql/optimizer/ob_insert_log_plan.cpp | 12 ++++++------ src/sql/optimizer/ob_log_del_upd.cpp | 4 ++-- src/sql/optimizer/ob_pwj_comparer.cpp | 8 ++++---- src/sql/optimizer/ob_pwj_comparer.h | 8 ++++---- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/sql/optimizer/ob_dynamic_sampling.cpp b/src/sql/optimizer/ob_dynamic_sampling.cpp index 6fd551fa44..6eeea59a7f 100644 --- a/src/sql/optimizer/ob_dynamic_sampling.cpp +++ b/src/sql/optimizer/ob_dynamic_sampling.cpp @@ -57,7 +57,7 @@ int ObDynamicSampling::estimate_table_rowcount(const ObDSTableParam ¶m, LOG_WARN("failed to get ds stat items"); } else if (get_ds_item_size() == 0) { //all ds item can get from cache. - LOG_TRACE("suceed to get ds item from cache", K(param)); + LOG_TRACE("succeed to get ds item from cache", K(param)); } else if (OB_FAIL(do_estimate_table_rowcount(param, throw_ds_error))) { LOG_WARN("failed to do estimate table rowcount", K(ret)); } else if (OB_FAIL(add_ds_result_cache(ds_result_items))) { @@ -97,7 +97,7 @@ int ObDynamicSampling::add_ds_result_cache(ObIArray &ds_result_i ds_result_items.at(i).stat_handle_))) { LOG_WARN("failed to add ds stat cache", K(ret)); } else { - ds_result_items.at(i).stat_ = NULL;//reset and the memory will free togather after ds. + ds_result_items.at(i).stat_ = NULL;//reset and the memory will free togther after ds. if (ds_result_items.at(i).type_ == ObDSResultItemType::OB_DS_BASIC_STAT) { logical_idx = i; } @@ -326,7 +326,7 @@ int ObDynamicSampling::add_ds_col_stat_item(const ObDSTableParam ¶m, } if (!found_it) { if (!ObColumnStatParam::is_valid_opt_col_type(col_expr->get_data_type())) { - //do nothing, only ds fullfill with column stats type. + //do nothing, only ds fulfill with column stats type. } else if (OB_FAIL(add_ds_stat_item(ObDSStatItem(&result_item, tmp_str, col_expr, @@ -507,7 +507,7 @@ int ObDynamicSampling::estimte_rowcount(int64_t max_ds_timeout, LOG_WARN("failed to pack dynamic sampling", K(ret)); } else if (OB_FAIL(prepare_and_store_session(session_info, session_value, nested_count, is_no_backslash_escapes, tx_desc))) { - throw_ds_error = true;//here we must throw error, because the seesion may be unavailable. + throw_ds_error = true;//here we must throw error, because the session may be unavailable. LOG_WARN("failed to prepare and store session", K(ret)); } else { need_restore_session = true; @@ -525,7 +525,7 @@ int ObDynamicSampling::estimte_rowcount(int64_t max_ds_timeout, int tmp_ret = OB_SUCCESS; if (OB_SUCCESS != (tmp_ret = restore_session(session_info, session_value, nested_count, is_no_backslash_escapes, tx_desc))) { - throw_ds_error = true;//here we must throw error, because the seesion may be unavailable. + throw_ds_error = true;//here we must throw error, because the session may be unavailable. ret = COVER_SUCC(tmp_ret); LOG_WARN("failed to restore session", K(tmp_ret)); } @@ -806,7 +806,7 @@ int ObDynamicSampling::calc_table_sample_block_ratio(const ObDSTableParam ¶m sample_block_ratio_ = sample_block_ratio_ * param.degree_; sample_block_ratio_ = sample_block_ratio_ < 100.0 ? sample_block_ratio_ : 100.0; } - //4.adjsut the seed. + //4.adjust the seed. seed_ = (param.degree_ > 1 || param.partition_infos_.count() > 1) ? 0 : 1; } LOG_TRACE("succeed to calc table sample block ratio", K(param), K(seed_), K(sample_micro_cnt), @@ -1332,7 +1332,7 @@ int ObDynamicSamplingUtils::check_ds_can_use_filters(const ObIArray for (int64_t i = 0; OB_SUCC(ret) && !no_use && i < filters.count(); ++i) { if (OB_ISNULL(filters.at(i))) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("get unexpcted null", K(ret), K(filters.at(i))); + LOG_WARN("get unexpected null", K(ret), K(filters.at(i))); } else if (OB_FAIL(check_ds_can_use_filter(filters.at(i), no_use, total_expr_cnt))) { LOG_WARN("failed to check ds can use filter", K(ret)); } @@ -1347,7 +1347,7 @@ int ObDynamicSamplingUtils::check_ds_can_use_filter(const ObRawExpr *filter, int ret = OB_SUCCESS; if (OB_ISNULL(filter)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("get unexpcted null", K(ret), K(filter)); + LOG_WARN("get unexpected null", K(ret), K(filter)); } else if (filter->has_flag(CNT_DYNAMIC_PARAM) || filter->has_flag(CNT_SUB_QUERY) || filter->has_flag(CNT_RAND_FUNC) || @@ -1581,7 +1581,7 @@ bool ObDynamicSamplingUtils::is_ds_virtual_table(const int64_t table_id) table_id == share::OB_TENANT_VIRTUAL_COLLATION_ORA_TID); } -//fowllowing function used to dynamic sampling join in the future. +//following function used to dynamic sampling join in the future. // int ObDynamicSampling::estimate_join_rowcount(const ObOptDSJoinParam ¶m, // uint64_t &join_output_cnt) diff --git a/src/sql/optimizer/ob_insert_log_plan.cpp b/src/sql/optimizer/ob_insert_log_plan.cpp index e1f08c5d46..d5a48e59a8 100644 --- a/src/sql/optimizer/ob_insert_log_plan.cpp +++ b/src/sql/optimizer/ob_insert_log_plan.cpp @@ -370,7 +370,7 @@ int ObInsertLogPlan::allocate_insert_values_as_top(ObLogicalOperator *&top) } else if (insert_stmt->is_error_logging() && OB_FAIL(values_op->extract_err_log_info())) { LOG_WARN("failed to extract error log exprs", K(ret)); } else if (OB_FAIL(values_op->compute_property())) { - LOG_WARN("failed to compute propery", K(ret)); + LOG_WARN("failed to compute property", K(ret)); } else { if (NULL != top) { ret = values_op->add_child(top); @@ -687,7 +687,7 @@ int ObInsertLogPlan::check_insert_stmt_need_multi_partition_dml(bool &is_multi_p } else if (OB_FAIL(insert_stmt->part_key_has_subquery(has_subquery_part_key))) { LOG_WARN("failed to check part key has subquery", K(ret)); } else if (OB_FAIL(insert_stmt->part_key_has_auto_inc(has_auto_inc_part_key))) { - LOG_WARN("check to check whether part key containts auto inc column", K(ret)); + LOG_WARN("check to check whether part key contains auto inc column", K(ret)); } else if (has_rand_part_key || has_subquery_part_key || has_auto_inc_part_key) { is_multi_part_dml = true; } else { /*do nothing*/ } @@ -1027,7 +1027,7 @@ int ObInsertLogPlan::copy_index_dml_infos_for_insert_up(const ObInsertTableInfo& LOG_WARN("init index assignment info failed", K(ret)); } else if (!table_info.is_link_table_ && OB_FAIL(check_update_part_key(index_schema, index_dml_info))) { - LOG_WARN("faield to check update part key", K(ret)); + LOG_WARN("failed to check update part key", K(ret)); } else if (0 == i) { if (OB_FAIL(index_dml_info->ck_cst_exprs_.assign(update_cst_exprs))) { LOG_WARN("failed to assign update check exprs", K(ret)); @@ -1295,7 +1295,7 @@ int ObInsertLogPlan::get_all_rowkey_columns_for_ddl(const ObInsertTableInfo& tab ObSQLSessionInfo* session_info = optimizer_context_.get_session_info(); if (OB_ISNULL(stmt) || OB_ISNULL(ddl_table_schema) || OB_ISNULL(session_info)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("get unexptected null", K(ret), K(stmt), K(ddl_table_schema)); + LOG_WARN("get unexpected null", K(ret), K(stmt), K(ddl_table_schema)); } else { const ObRowkeyInfo &rowkey_info = ddl_table_schema->get_rowkey_info(); uint64_t rowkey_column_id = 0; @@ -1357,7 +1357,7 @@ int ObInsertLogPlan::get_all_columns_for_ddl(const ObInsertTableInfo& table_info const ObInsertStmt* stmt = get_stmt(); if (OB_ISNULL(stmt) || OB_ISNULL(ddl_table_schema)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("get unexptected null", K(ret), K(stmt), K(ddl_table_schema)); + LOG_WARN("get unexpected null", K(ret), K(stmt), K(ddl_table_schema)); } else { ObTableSchema::const_column_iterator iter = ddl_table_schema->column_begin(); ObTableSchema::const_column_iterator end = ddl_table_schema->column_end(); @@ -1392,7 +1392,7 @@ int ObInsertLogPlan::get_all_part_columns_for_ddl(const ObInsertTableInfo& table const ObInsertStmt* stmt = get_stmt(); if (OB_ISNULL(stmt) || OB_ISNULL(data_table_schema)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("get unexptected null", K(ret), K(stmt), K(data_table_schema)); + LOG_WARN("get unexpected null", K(ret), K(stmt), K(data_table_schema)); } else { ObTableSchema::const_column_iterator iter = data_table_schema->column_begin(); ObTableSchema::const_column_iterator end = data_table_schema->column_end(); diff --git a/src/sql/optimizer/ob_log_del_upd.cpp b/src/sql/optimizer/ob_log_del_upd.cpp index ad1a46f1f6..3f86cf52f1 100644 --- a/src/sql/optimizer/ob_log_del_upd.cpp +++ b/src/sql/optimizer/ob_log_del_upd.cpp @@ -924,7 +924,7 @@ int ObLogDelUpd::get_rowid_version(int64_t &rowid_version) } else if (OB_ISNULL(schema_guard = get_plan()->get_optimizer_context().get_schema_guard()) || OB_ISNULL(session_info = get_plan()->get_optimizer_context().get_session_info())) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("failed to get schama guart", K(ret), K(schema_guard), K(session_info)); + LOG_WARN("failed to get schema guard", K(ret), K(schema_guard), K(session_info)); } else if (OB_FAIL(schema_guard->get_table_schema( session_info->get_effective_tenant_id(), get_index_tid(), table_schema))) { @@ -1324,7 +1324,7 @@ int ObLogDelUpd::generate_fk_lookup_part_id_expr(IndexDMLInfo &index_dml_info) } else if (OB_ISNULL(schema_guard = get_plan()->get_optimizer_context().get_schema_guard()) || OB_ISNULL(session_info = get_plan()->get_optimizer_context().get_session_info())) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("failed to get schama guart", K(ret), K(schema_guard), K(session_info)); + LOG_WARN("failed to get schema guard", K(ret), K(schema_guard), K(session_info)); } else if (OB_FAIL(schema_guard->get_table_schema(session_info->get_effective_tenant_id(), index_dml_info.ref_table_id_, table_schema))) { diff --git a/src/sql/optimizer/ob_pwj_comparer.cpp b/src/sql/optimizer/ob_pwj_comparer.cpp index ae9f4f1950..bbba83602d 100644 --- a/src/sql/optimizer/ob_pwj_comparer.cpp +++ b/src/sql/optimizer/ob_pwj_comparer.cpp @@ -685,10 +685,10 @@ int ObStrictPwjComparer::is_sub_partition_logically_equal(const PwjTable &l_tabl LOG_WARN("get unexpected null", K(ret)); } else if (OB_FAIL(get_subpartition_indexes_by_part_index(l_table, l_part_index, l_used_partition_indexes))) { - LOG_WARN("faield to get subpartition indexes by part index", K(ret)); + LOG_WARN("failed to get subpartition indexes by part index", K(ret)); } else if (OB_FAIL(get_subpartition_indexes_by_part_index(r_table, r_part_index, r_used_partition_indexes))) { - LOG_WARN("faield to get subpartition indexes by part index", K(ret)); + LOG_WARN("failed to get subpartition indexes by part index", K(ret)); } else if (l_used_partition_indexes.count() != r_used_partition_indexes.count()) { is_equal = false; } else if (is_hash_like_part(l_table.subpart_type_)) { @@ -821,7 +821,7 @@ int ObStrictPwjComparer::check_hash_subpartition_equal(ObSubPartition **l_subpar OB_ISNULL(l_subpartition_array[l_indexes.at(i)]) || OB_ISNULL(r_subpartition_array[r_indexes.at(i)])) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("get unexpeted error", K(ret), K(l_subpartition_array), K(r_subpartition_array)); + LOG_WARN("get unexpected error", K(ret), K(l_subpartition_array), K(r_subpartition_array)); } else { subpart_tablet_id_pair.first = l_subpartition_array[l_indexes.at(i)]->get_tablet_id().id(); subpart_tablet_id_pair.second = r_subpartition_array[r_indexes.at(i)]->get_tablet_id().id(); @@ -1062,7 +1062,7 @@ int ObStrictPwjComparer::get_sub_part_tablet_id(const PwjTable &table, } if (OB_SUCC(ret) && !find) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("failed to find part_index in all_partition_idnexes", K(ret), + LOG_WARN("failed to find part_index in all_partition_indexes", K(ret), K(part_index), K(table.all_partition_indexes_)); } } diff --git a/src/sql/optimizer/ob_pwj_comparer.h b/src/sql/optimizer/ob_pwj_comparer.h index b93be4347d..0dbe9016de 100644 --- a/src/sql/optimizer/ob_pwj_comparer.h +++ b/src/sql/optimizer/ob_pwj_comparer.h @@ -114,14 +114,14 @@ public: virtual int add_table(PwjTable &table, bool &is_match_pwj); /** - * 从phy_table_locaton_info中提取以下分区相关的信息 + * 从phy_table_location_info中提取以下分区相关的信息 * @param all_partition_ids: - * phy_table_locaton_info中所有的partition_id(物理分区id) + * phy_table_location_info中所有的partition_id(物理分区id) * @param all_partition_indexes: - * phy_table_locaton_info中每一个partition_id(物理分区id)的 + * phy_table_location_info中每一个partition_id(物理分区id)的 * part_id(一级逻辑分区id)在part_array中的偏移 * @param all_subpartition_indexes: - * phy_table_locaton_info中每一个partition_id(物理分区id)的 + * phy_table_location_info中每一个partition_id(物理分区id)的 * subpart_id(二级逻辑分区id)在subpart_array中的偏移 * @param is_partition_single: * 二级分区表的phy_table_location_info_中,是否只涉及到一个一级分区 From 9f0f2b3092dd6630a409d9c7de6abe2166c9d8f1 Mon Sep 17 00:00:00 2001 From: csch Date: Sun, 22 Jan 2023 13:20:35 +0800 Subject: [PATCH 03/13] fix some typo error --- src/sql/optimizer/ob_join_order.h | 4 ++-- src/sql/optimizer/ob_log_insert.cpp | 4 ++-- src/sql/optimizer/ob_log_unpivot.cpp | 2 +- src/sql/optimizer/ob_optimizer_util.h | 4 ++-- src/sql/optimizer/ob_sharding_info.cpp | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/sql/optimizer/ob_join_order.h b/src/sql/optimizer/ob_join_order.h index 560839f048..af01053599 100644 --- a/src/sql/optimizer/ob_join_order.h +++ b/src/sql/optimizer/ob_join_order.h @@ -140,7 +140,7 @@ namespace sql ObRelIds R_TES_; //left degenerate set,用于检查join condition为退化谓词的合法性,存放的是左子树的所有表集 ObRelIds L_DS_; - //right degnerate set,存放的是右子树的所有表集 + //right degenerate set,存放的是右子树的所有表集 ObRelIds R_DS_; bool is_degenerate_pred_; //当前join是否可交换左右表 @@ -1674,7 +1674,7 @@ struct NullAwareAntiJoinInfo { bool &sort_match); /** - * 检查是否是intersting order + * 检查是否是interesting order * @keys 索引列 * @stmt * @interest_column_ids 匹配的索引列的id diff --git a/src/sql/optimizer/ob_log_insert.cpp b/src/sql/optimizer/ob_log_insert.cpp index 3c1f5c2ffd..e2c5fd9af3 100644 --- a/src/sql/optimizer/ob_log_insert.cpp +++ b/src/sql/optimizer/ob_log_insert.cpp @@ -455,7 +455,7 @@ int ObLogInsert::generate_multi_part_partition_id_expr() ObRawExprCopier copier(get_plan()->get_optimizer_context().get_expr_factory()); if (OB_ISNULL(index_info)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("replae dml info is null", K(ret)); + LOG_WARN("replace dml info is null", K(ret)); } else if (OB_FAIL(generate_old_calc_partid_expr(*index_info))) { LOG_WARN("failed to generate calc partid expr", K(ret)); } else if (!is_heap_table && OB_FAIL(ObLogTableScan::replace_gen_column(get_plan(), @@ -478,7 +478,7 @@ int ObLogInsert::generate_multi_part_partition_id_expr() } } } else if (get_insert_up()) { - // generate the calc_part_id_expr_ of update caluse + // generate the calc_part_id_expr_ of update clause for (int64_t i = 0; OB_SUCC(ret) && i < get_insert_up_index_dml_infos().count(); ++i) { IndexDMLInfo *dml_info = get_insert_up_index_dml_infos().at(i); ObSqlSchemaGuard *schema_guard = NULL; diff --git a/src/sql/optimizer/ob_log_unpivot.cpp b/src/sql/optimizer/ob_log_unpivot.cpp index 073c8877d2..95b82b7c51 100644 --- a/src/sql/optimizer/ob_log_unpivot.cpp +++ b/src/sql/optimizer/ob_log_unpivot.cpp @@ -344,7 +344,7 @@ int ObLogUnpivot::compute_fd_item_set() /*do nothing*/ } else if (OB_NOT_NULL(fd_item_set) && // rollup 时 fd_item_set is null OB_FAIL(deduce_const_exprs_and_ft_item_set(*fd_item_set))) { - LOG_WARN("falied to deduce fd item set", K(ret)); + LOG_WARN("failed to deduce fd item set", K(ret)); } else { set_fd_item_set(fd_item_set); } diff --git a/src/sql/optimizer/ob_optimizer_util.h b/src/sql/optimizer/ob_optimizer_util.h index 78f3833029..6afd4b5a62 100644 --- a/src/sql/optimizer/ob_optimizer_util.h +++ b/src/sql/optimizer/ob_optimizer_util.h @@ -208,7 +208,7 @@ public: static bool same_exprs(const common::ObIArray &src_exprs, const common::ObIArray &target_exprs); - //for topk, non terminal expr with agg params need to be deep copyed to prevent sum being replaced + //for topk, non terminal expr with agg params need to be deep copied to prevent sum being replaced //with sum(sum) static int clone_expr_for_topk(ObRawExprFactory &expr_factory, ObRawExpr* src, ObRawExpr* &dst); @@ -1592,7 +1592,7 @@ int ObOptimizerUtil::intersect(const ObIArray &first, /** * @brief intersect, to reduce the assign cost when computing many sets' overlap. * @param sets the element sets to calculate the overlap. - * @param result the reuslt of the overlap + * @param result the result of the overlap * @return */ template diff --git a/src/sql/optimizer/ob_sharding_info.cpp b/src/sql/optimizer/ob_sharding_info.cpp index e6bacb5451..e15d5a18c9 100644 --- a/src/sql/optimizer/ob_sharding_info.cpp +++ b/src/sql/optimizer/ob_sharding_info.cpp @@ -114,7 +114,7 @@ int ObShardingInfo::init_partition_info(ObOptimizerContext &ctx, } // virtual table can't get part idx from mock list table schema // so don't call extract_all_partition_indexes, - // and not used pwj enhence on virtual table + // and not used pwj enhance on virtual table if (is_virtual_table(ref_table_id)) { // do nothing } else if (OB_FAIL(ObPwjComparer::extract_all_partition_indexes(phy_table_location_info, @@ -160,7 +160,7 @@ int ObShardingInfo::set_partition_key( } } } else if (OB_FAIL(partition_keys.push_back(part_expr))) { - LOG_WARN("Failed to add partiton column expr", K(ret)); + LOG_WARN("Failed to add partition column expr", K(ret)); } else { } } return ret; @@ -471,7 +471,7 @@ int ObShardingInfo::check_if_match_partition_wise(const EqualSets &equal_sets, is_partition_wise))) { LOG_WARN("failed to check if match partition wise join", K(ret)); } else if (is_partition_wise) { - LOG_TRACE("suceed to check if match partition wise join", K(is_partition_wise)); + LOG_TRACE("succeed to check if match partition wise join", K(is_partition_wise)); } else if (OB_FAIL(append(left_sharding, left_weak_sharding)) || OB_FAIL(append(right_sharding, right_weak_sharding))) { LOG_WARN("failed to append sharding info", K(ret)); @@ -546,7 +546,7 @@ int ObShardingInfo::check_if_match_extended_partition_wise(const EqualSets &equa is_ext_partition_wise))) { LOG_WARN("failed to check if match extended partition wise join", K(ret)); } else if (is_ext_partition_wise) { - LOG_TRACE("suceed to check if match extended partition wise join", K(is_ext_partition_wise)); + LOG_TRACE("succeed to check if match extended partition wise join", K(is_ext_partition_wise)); } else if (OB_FAIL(append(left_sharding, left_weak_sharding)) || OB_FAIL(append(right_sharding, right_weak_sharding))) { LOG_WARN("failed to append sharding info", K(ret)); From e61f6a417010ef0d4a1a97e1246f06dba02493e2 Mon Sep 17 00:00:00 2001 From: csch Date: Fri, 10 Feb 2023 11:30:15 +0800 Subject: [PATCH 04/13] fix some typo error --- src/sql/engine/ob_bit_vector.h | 2 +- src/sql/engine/ob_exec_context.cpp | 4 ++-- src/sql/engine/ob_physical_plan.cpp | 4 ++-- src/sql/engine/ob_physical_plan.h | 6 +++--- src/sql/engine/ob_physical_plan_ctx.h | 4 ++-- src/sql/engine/ob_tenant_sql_memory_manager.cpp | 10 +++++----- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/sql/engine/ob_bit_vector.h b/src/sql/engine/ob_bit_vector.h index 6b56d7c8d1..33a04fee87 100644 --- a/src/sql/engine/ob_bit_vector.h +++ b/src/sql/engine/ob_bit_vector.h @@ -112,7 +112,7 @@ public: const T *reinterpret_data() const { return reinterpret_cast(data_); } /** - * access all valid fliped bit, flip a bit meaning change its value from 0 to 1 or from 1 to 0 + * access all valid flipped bit, flip a bit meaning change its value from 0 to 1 or from 1 to 0 * and it access all 0 bit */ template diff --git a/src/sql/engine/ob_exec_context.cpp b/src/sql/engine/ob_exec_context.cpp index ba89dea689..6e91f78bf2 100644 --- a/src/sql/engine/ob_exec_context.cpp +++ b/src/sql/engine/ob_exec_context.cpp @@ -682,7 +682,7 @@ int ObExecContext::add_temp_table_interm_result_ids(uint64_t temp_table_id, ObTempTableResultInfo info; info.addr_ = sqc_addr; if (OB_FAIL(info.interm_result_ids_.assign(ids))) { - LOG_WARN("failed to assign to interm resuld ids.", K(ret)); + LOG_WARN("failed to assign to interm result ids.", K(ret)); } else if (OB_FAIL(ctx.interm_result_infos_.push_back(info))) { LOG_WARN("failed to push back result info", K(ret)); } else { @@ -697,7 +697,7 @@ int ObExecContext::add_temp_table_interm_result_ids(uint64_t temp_table_id, ObTempTableResultInfo info; info.addr_ = sqc_addr; if (OB_FAIL(info.interm_result_ids_.assign(ids))) { - LOG_WARN("failed to assign to interm resuld ids.", K(ret)); + LOG_WARN("failed to assign to interm result ids.", K(ret)); } else if (OB_FAIL(ctx.interm_result_infos_.push_back(info))) { LOG_WARN("failed to push back result info", K(ret)); } else if (OB_FAIL(temp_ctx.push_back(ctx))) { diff --git a/src/sql/engine/ob_physical_plan.cpp b/src/sql/engine/ob_physical_plan.cpp index 72e99694aa..c4fbf6b864 100644 --- a/src/sql/engine/ob_physical_plan.cpp +++ b/src/sql/engine/ob_physical_plan.cpp @@ -1172,7 +1172,7 @@ int ObPhysicalPlan::update_cache_obj_stat(ObILibCacheCtx &ctx) if (OB_FAIL(ob_write_string(get_allocator(), trunc_stmt.string(), stat_.stmt_))) { - SQL_PC_LOG(WARN, "fail to set turncate string", K(ret)); + SQL_PC_LOG(WARN, "fail to set truncate string", K(ret)); } stat_.ps_stmt_id_ = pc_ctx.fp_result_.pc_key_.key_id_; } else { @@ -1180,7 +1180,7 @@ int ObPhysicalPlan::update_cache_obj_stat(ObILibCacheCtx &ctx) if (OB_FAIL(ob_write_string(get_allocator(), trunc_stmt.string(), stat_.stmt_))) { - SQL_PC_LOG(WARN, "fail to set turncate string", K(ret)); + SQL_PC_LOG(WARN, "fail to set truncate string", K(ret)); } } stat_.large_querys_= 0; diff --git a/src/sql/engine/ob_physical_plan.h b/src/sql/engine/ob_physical_plan.h index a7dc08c3c2..4280ccb137 100644 --- a/src/sql/engine/ob_physical_plan.h +++ b/src/sql/engine/ob_physical_plan.h @@ -508,9 +508,9 @@ private: * is not saved: * 1. resolve the statement to get the partition columns * 2. extract the range of the partition columns using query range and given predicates - * 3. get the ObRawExpr of the partition expr and convert it to a postfix expresssion + * 3. get the ObRawExpr of the partition expr and convert it to a postfix expression * 4. calculate the partition ids using the postfix expression - * 5. inquire the location cache servince to get a list of partition locations given + * 5. inquire the location cache service to get a list of partition locations given * the partition ids * * However, with the pre table location saved, we can readily skip steps 1, 2(partially), @@ -657,7 +657,7 @@ public: bool enable_append_; // for APPEND hint uint64_t append_table_id_; ObLogicalPlanRawData logical_plan_; - // for detecor manager + // for detector manager bool is_enable_px_fast_reclaim_; }; diff --git a/src/sql/engine/ob_physical_plan_ctx.h b/src/sql/engine/ob_physical_plan_ctx.h index c05600a0b9..92618c9486 100644 --- a/src/sql/engine/ob_physical_plan_ctx.h +++ b/src/sql/engine/ob_physical_plan_ctx.h @@ -471,7 +471,7 @@ private: static const int64_t ESTIMATE_PS_RESERVE_TIME = 100 * 1000; static const int64_t ESTIMATE_TRANS_RESERVE_TIME = 70 * 1000; //oracle calc time during running, not before running. - //oracle datetime func has two categoris: sysdate/systimestamp, current_date/current_timestamp/localtimestamp + //oracle datetime func has two categories: sysdate/systimestamp, current_date/current_timestamp/localtimestamp //so we use `cur_time_` for first used-category, `cur_time_ + DELTA_TARDY_TIME_US` for second used-category. static const int64_t DELTA_TARDY_TIME_US = 5; common::ObIAllocator &allocator_; @@ -588,7 +588,7 @@ private: ObRemoteSqlInfo remote_sql_info_; //used for expr output pack, do encode according to its field const common::ObIArray *field_array_; - //used for expr output pack, do bianry encode or text encode + //used for expr output pack, do binary encode or text encode bool is_ps_protocol_; //used for monitor operator information int64_t plan_start_time_; diff --git a/src/sql/engine/ob_tenant_sql_memory_manager.cpp b/src/sql/engine/ob_tenant_sql_memory_manager.cpp index 5a082f261f..fd4d0e6fa4 100644 --- a/src/sql/engine/ob_tenant_sql_memory_manager.cpp +++ b/src/sql/engine/ob_tenant_sql_memory_manager.cpp @@ -194,7 +194,7 @@ void ObTenantSqlMemoryManager::ObSqlWorkAreaCalcInfo::destroy(ObIAllocator &allo } // delta计算逻辑,前一个interval和后一个interval计算相差公式为 -// suppose calculate the idx interaval, and pre-interval is (idx + 1) +// suppose calculate the idx interval, and pre-interval is (idx + 1) // delta = intervals_[idx+1].total_hash_sise // - intervals_[idx].interval_cache_size // * intervals_[idx+1].total_hash_cnt + no_cache_cnt * interval_size @@ -901,7 +901,7 @@ int ObTenantSqlMemoryManager::get_max_work_area_size( // 1 - x^3函数,表示随着hold内存越多,可用内存越少,同时alloc越多,可用内存越少 // 反之,hold越少,可用内存越多,alloc越少,可用内存又会越多 // 这里采用平方主要是为了内存增长和减少都比较平滑 - // so: fomula + // so: formula // hold_ratio = hold / max_size; // tmp_max_wa = (1 - hold_ratio * hold_ratio * hold_ratio) * (max - hold) + alloc // alloc_ratio = alloc / tmp_max_wa @@ -917,7 +917,7 @@ int ObTenantSqlMemoryManager::get_max_work_area_size( // max_wa_memory_size = (tmp_max_wa_memory_size >> 1); // } else { - // only use fomula (1 - ratio ^ 3) + // only use formula (1 - ratio ^ 3) max_wa_memory_size = tmp_max_wa_memory_size * (1 - alloc_ratio * alloc_ratio * alloc_ratio); } max_workarea_size_ = tenant_work_area_max_size; @@ -1172,7 +1172,7 @@ int ObTenantSqlMemoryManager::calculate_global_bound_size_by_interval_info( global_bound_size_ = calc_info.get_global_bound_size(); mem_target_ = calc_info.get_mem_target(); pre_enable_auto_memory_mgr_ = true; - // last set enable auto memory manager, so others read the vairable to avoiding dirty read + // last set enable auto memory manager, so others read the variable to avoiding dirty read enable_auto_memory_mgr_ = true; } if (auto_calc) { @@ -1233,7 +1233,7 @@ int ObTenantSqlMemoryManager::calculate_global_bound_size(ObIAllocator *allocato global_bound_size_ = min_bound_size_; drift_size_ = 0; pre_enable_auto_memory_mgr_ = true; - // last set enable auto memory manager, so others read the vairable to avoiding dirty read + // last set enable auto memory manager, so others read the variable to avoiding dirty read enable_auto_memory_mgr_ = true; if (auto_calc) { LOG_INFO("work area memory zero", K(tenant_id_), K(global_bound_size_)); From 60700dde288475a6889fdc9fbbe3fa19d49345b2 Mon Sep 17 00:00:00 2001 From: csch Date: Wed, 22 Feb 2023 16:32:55 +0800 Subject: [PATCH 05/13] fix some typo error --- src/sql/engine/cmd/ob_ddl_executor_util.cpp | 4 ++-- src/sql/engine/cmd/ob_load_data_impl.cpp | 4 ++-- src/sql/engine/cmd/ob_load_data_rpc.cpp | 8 ++++---- src/sql/engine/cmd/ob_partition_executor_utils.cpp | 8 ++++---- src/sql/engine/cmd/ob_tenant_executor.cpp | 2 +- src/sql/engine/cmd/ob_variable_set_executor.cpp | 6 +++--- src/sql/engine/ob_operator.cpp | 8 ++++---- src/sql/engine/ob_sql_mem_mgr_processor.cpp | 2 +- src/sql/engine/ob_tenant_sql_memory_manager.h | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/sql/engine/cmd/ob_ddl_executor_util.cpp b/src/sql/engine/cmd/ob_ddl_executor_util.cpp index d0a19ded2b..421f587e3d 100644 --- a/src/sql/engine/cmd/ob_ddl_executor_util.cpp +++ b/src/sql/engine/cmd/ob_ddl_executor_util.cpp @@ -94,7 +94,7 @@ int ObDDLExecutorUtil::wait_ddl_finish( if (OB_FAIL(ret)) { } else if (OB_FAIL(handle_session_exception(session))) { - LOG_WARN("session exeception happened", K(ret), K(is_support_cancel)); + LOG_WARN("session exception happened", K(ret), K(is_support_cancel)); if (is_support_cancel && OB_TMP_FAIL(cancel_ddl_task(tenant_id, common_rpc_proxy))) { LOG_WARN("cancel ddl task failed", K(tmp_ret)); ret = OB_SUCCESS; @@ -246,7 +246,7 @@ int ObDDLExecutorUtil::wait_ddl_retry_task_finish( } if (OB_FAIL(ret)) { } else if (OB_FAIL(handle_session_exception(session))) { - LOG_WARN("session exeception happened", K(ret)); + LOG_WARN("session exception happened", K(ret)); if (OB_TMP_FAIL(cancel_ddl_task(tenant_id, common_rpc_proxy))) { LOG_WARN("cancel ddl task failed", K(tmp_ret)); ret = OB_SUCCESS; diff --git a/src/sql/engine/cmd/ob_load_data_impl.cpp b/src/sql/engine/cmd/ob_load_data_impl.cpp index 4fa6fb89fb..e1dad3d365 100644 --- a/src/sql/engine/cmd/ob_load_data_impl.cpp +++ b/src/sql/engine/cmd/ob_load_data_impl.cpp @@ -1633,7 +1633,7 @@ int ObLoadDataSPImpl::handle_returned_insert_task(ObExecContext &ctx, ret = found ? box.server_last_available_ts.update(addr, curr_time) : box.server_last_available_ts.insert(addr, curr_time); if (OB_FAIL(ret)) { - LOG_WARN("failt to update server_last_available_ts", + LOG_WARN("failed to update server_last_available_ts", K(ret), K(addr), K(found), K(is_leader_changed)); } } @@ -2763,7 +2763,7 @@ int ObLoadDataSPImpl::ToolBox::init(ObExecContext &ctx, ObLoadDataStmt &load_stm LOG_WARN("fail to init generator", K(ret)); } else if (OB_FAIL(generator.set_params(insert_stmt_head_buff, load_args.file_cs_type_, session->get_sql_mode()))) { - LOG_WARN("fail to set pararms", K(ret)); + LOG_WARN("fail to set params", K(ret)); } else if (OB_FAIL(copy_exprs_for_shuffle_task(ctx, load_stmt, insert_infos, generator.get_field_exprs(), generator.get_insert_exprs()))) { diff --git a/src/sql/engine/cmd/ob_load_data_rpc.cpp b/src/sql/engine/cmd/ob_load_data_rpc.cpp index c98af016d6..82480663dc 100644 --- a/src/sql/engine/cmd/ob_load_data_rpc.cpp +++ b/src/sql/engine/cmd/ob_load_data_rpc.cpp @@ -301,7 +301,7 @@ int ObRpcLoadDataTaskExecuteP::process() succ_row_count = affected_rows; } - //2. if failed, try insert seperately + //2. if failed, try insert separately if (OB_SUCC(ret) && OB_SUCCESS != exec_ret) { ObSqlString seperate_insert_sql_head; ObSqlString seperate_insert_sql; @@ -383,7 +383,7 @@ int ObRpcLoadDataTaskExecuteP::process() if (OB_SUCC(ret) && OB_SUCCESS != memory_check_ret) { ret = memory_check_ret; //cover ret } - //sumarize return value + //summarize return value if (OB_FAIL(ret)) { ObLoadDataUtils::set_flag(result.task_flags_, static_cast(ObLoadTaskResultFlag::RPC_REMOTE_PROCESS_ERROR)); @@ -485,7 +485,7 @@ int ObRpcLoadDataTaskCallBack::process() } MEM_BARRIER(); if (OB_SUCCESS != (second_ret = task_controller_.on_task_finished())) { - //signal main thread failed, fetal error. TODO wjh: handle this error + //signal main thread failed, fatal error. TODO wjh: handle this error if (OB_SUCCESS == ret) { ret = second_ret; } @@ -542,7 +542,7 @@ void ObParallelTaskController::wait_all_task_finish(const char *task_name, int64 } } if (is_too_long) { - LOG_WARN_RET(OB_ERR_UNEXPECTED, "LOAD DATA finish waitting long task", K(wait_duration_ms)); + LOG_WARN_RET(OB_ERR_UNEXPECTED, "LOAD DATA finish waiting long task", K(wait_duration_ms)); } } diff --git a/src/sql/engine/cmd/ob_partition_executor_utils.cpp b/src/sql/engine/cmd/ob_partition_executor_utils.cpp index fbdd8dd155..e6d3b7fae1 100644 --- a/src/sql/engine/cmd/ob_partition_executor_utils.cpp +++ b/src/sql/engine/cmd/ob_partition_executor_utils.cpp @@ -235,7 +235,7 @@ int check_list_value_duplicate(T **partition_array, !ObSQLUtils::is_same_type_for_compare(tmp_row.get_cell(z).get_meta(), row.get_cell(z).get_meta())) { ret = OB_ERR_PARTITION_VALUE_ERROR; - LOG_WARN("partiton value should have same meta info", K(ret), K(tmp_row), K(row), K(j)); + LOG_WARN("partition value should have same meta info", K(ret), K(tmp_row), K(row), K(j)); } } if (OB_SUCC(ret) && tmp_row == row) { @@ -477,7 +477,7 @@ int ObPartitionExecutorUtils::set_range_part_high_bound(ObExecContext &ctx, ObSEArray range_partition_obj; if (is_subpart && OB_UNLIKELY(!stmt.use_def_sub_part())) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("subpart shoud be template", K(ret)); + LOG_WARN("subpart should be template", K(ret)); } else if (is_subpart && (OB_ISNULL(subpartition_array))) { ret = OB_ERR_UNEXPECTED; LOG_WARN("subpartition_array is NULL", K(ret)); @@ -633,7 +633,7 @@ int ObPartitionExecutorUtils::check_increasing_range_value(T **array, && !rowkey_cur->get_obj_ptr()[j].is_max_value() && !rowkey_last->get_obj_ptr()[j].is_max_value()) { ret = OB_ERR_PARTITION_VALUE_ERROR; - LOG_WARN("partiton value should have same meta info", K(ret), K(*rowkey_cur), K(*rowkey_last), K(j)); + LOG_WARN("partition value should have same meta info", K(ret), K(*rowkey_cur), K(*rowkey_last), K(j)); } } } @@ -1221,7 +1221,7 @@ int ObPartitionExecutorUtils::set_list_part_rows(ObExecContext &ctx, table_schema.get_def_sub_part_num() : table_schema.get_first_part_num(); if (is_subpart && OB_UNLIKELY(!stmt.use_def_sub_part())) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("subpart shoud be template", K(ret)); + LOG_WARN("subpart should be template", K(ret)); } else if (is_subpart && (OB_ISNULL(subpartition_array))) { ret = OB_ERR_UNEXPECTED; LOG_WARN("get null subpartition_array", K(ret)); diff --git a/src/sql/engine/cmd/ob_tenant_executor.cpp b/src/sql/engine/cmd/ob_tenant_executor.cpp index 7d5a75e700..02adc2b15f 100644 --- a/src/sql/engine/cmd/ob_tenant_executor.cpp +++ b/src/sql/engine/cmd/ob_tenant_executor.cpp @@ -902,7 +902,7 @@ int ObPurgeRecycleBinExecutor::execute(ObExecContext &ctx, ObPurgeRecycleBinStmt //一个租户只purge 10个回收站的对象,防止卡住RS的ddl线程 //每次返回purge的行数,只有purge数目少于affected_rows int64_t start_time = ObTimeUtility::current_time(); - // replcace timeout from hardcode 9s to 10 * GCONF.rpc_timeout + // replace timeout from hardcode 9s to 10 * GCONF.rpc_timeout if (OB_FAIL(common_rpc_proxy->timeout(10 * GCONF.rpc_timeout).purge_expire_recycle_objects(purge_recyclebin_arg, affected_rows))) { LOG_WARN("purge reyclebin objects failed", K(ret), K(affected_rows), K(purge_recyclebin_arg)); //如果失败情况下,不需要继续 diff --git a/src/sql/engine/cmd/ob_variable_set_executor.cpp b/src/sql/engine/cmd/ob_variable_set_executor.cpp index b2afdebd77..3590266c11 100644 --- a/src/sql/engine/cmd/ob_variable_set_executor.cpp +++ b/src/sql/engine/cmd/ob_variable_set_executor.cpp @@ -483,7 +483,7 @@ int ObVariableSetExecutor::set_user_variable(const ObObj &val, ret = OB_ERR_UNEXPECTED; LOG_WARN("session is null", K(ret)); } else if (OB_FAIL(switch_to_session_variable(expr_ctx, val, sess_var))) { - LOG_WARN("fail to stiwch to session variablee", K(ret), K(val)); + LOG_WARN("fail to switch to session variable", K(ret), K(val)); } else if (OB_FAIL(session->replace_user_variable(*ctx, variable_name, sess_var))) { LOG_WARN("set variable to session plan failed", K(ret), K(variable_name)); } else { @@ -502,7 +502,7 @@ int ObVariableSetExecutor::set_user_variable(const ObObj &val, ret = OB_ERR_UNEXPECTED; LOG_WARN("session is null", K(ret)); } else if (OB_FAIL(switch_to_session_variable(val, sess_var))) { - LOG_WARN("fail to stiwch to session variablee", K(ret), K(val)); + LOG_WARN("fail to switch to session variable", K(ret), K(val)); } else if (OB_FAIL(session->replace_user_variable(variable_name, sess_var))) { LOG_WARN("set variable to session plan failed", K(ret), K(variable_name)); } else { @@ -994,7 +994,7 @@ int ObVariableSetExecutor::process_session_autocommit_hook(ObExecContext &exec_c } else if (transaction::ObGlobalTxType::DBLINK_TRANS == global_tx_type) { if (my_session->need_restore_auto_commit()) { ret = OB_OP_NOT_ALLOW; - LOG_WARN("not allow to set autocomit off", K(ret), K(xid)); + LOG_WARN("not allow to set autocommit off", K(ret), K(xid)); } else { LOG_INFO("set autocommit off in dblink trans", K(ret), K(xid)); } diff --git a/src/sql/engine/ob_operator.cpp b/src/sql/engine/ob_operator.cpp index 00fd864f21..ce6bfd642d 100644 --- a/src/sql/engine/ob_operator.cpp +++ b/src/sql/engine/ob_operator.cpp @@ -484,7 +484,7 @@ int ObOpSpec::accept(ObOpSpecVisitor &visitor) const LOG_WARN("failed to pre visit", K(ret)); } if (OB_FAIL(ret)) { - // do nothingn + // do nothing } else if (OB_ISNULL(children_)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("unexpected null children", K(ret)); @@ -791,7 +791,7 @@ int ObOperator::init_skip_vector() // copy from ob_phy_operator.cpp int ObOperator::rescan() { - //rescan must reset the oeprator context to the state after call operator open() + //rescan must reset the operator context to the state after call operator open() //for the general non-terminal operator, function rescan() is to call children rescan() //if you want to do more, you must rewrite this function //for the general terminal operator, function rescan() does nothing @@ -1052,7 +1052,7 @@ int ObOperator::get_next_row() begin_cpu_time_counting(); begin_ash_line_id_reg(); if (OB_FAIL(check_stack_once())) { - LOG_WARN("too deep recusive", K(ret)); + LOG_WARN("too deep recursive", K(ret)); } else { if (ctx_.get_my_session()->is_user_session() || spec_.plan_->get_phy_plan_hint().monitor_) { IGNORE_RETURN try_register_rt_monitor_node(1); @@ -1153,7 +1153,7 @@ int ObOperator::get_next_batch(const int64_t max_row_cnt, const ObBatchRows *&ba begin_ash_line_id_reg(); if (OB_FAIL(check_stack_once())) { - LOG_WARN("too deep recusive", K(ret)); + LOG_WARN("too deep recursive", K(ret)); } else { if (OB_UNLIKELY(spec_.need_check_output_datum_ && brs_checker_)) { if (OB_FAIL(brs_checker_->check_datum_modified())) { diff --git a/src/sql/engine/ob_sql_mem_mgr_processor.cpp b/src/sql/engine/ob_sql_mem_mgr_processor.cpp index deff24fe20..0e468f107e 100644 --- a/src/sql/engine/ob_sql_mem_mgr_processor.cpp +++ b/src/sql/engine/ob_sql_mem_mgr_processor.cpp @@ -236,7 +236,7 @@ int ObSqlMemMgrProcessor::extend_max_memory_size( int ret = OB_SUCCESS; need_dump = true; if (OB_FAIL(try_upgrade_auto_mgr(allocator, mem_used))) { - LOG_WARN("failed to try udgrade auto manager", K(ret)); + LOG_WARN("failed to try upgrade auto manager", K(ret)); } else if (OB_UNLIKELY(!is_auto_mgr())) { /* do nothing */ } else if (OB_NOT_NULL(sql_mem_mgr_)) { diff --git a/src/sql/engine/ob_tenant_sql_memory_manager.h b/src/sql/engine/ob_tenant_sql_memory_manager.h index c432083f56..00682f77e0 100644 --- a/src/sql/engine/ob_tenant_sql_memory_manager.h +++ b/src/sql/engine/ob_tenant_sql_memory_manager.h @@ -314,7 +314,7 @@ public: int64_t est_cache_size_; // 估计的全内存大小 int64_t est_one_pass_size_; // 估计的one pass大小 int64_t last_memory_used_; // 上次执行内存使用大小 - int64_t last_execution_; // 上次执行的状态,是optimal、onepass还是multimpass + int64_t last_execution_; // 上次执行的状态,是optimal、onepass还是multipass int64_t last_degree_; // 上次执行dop int64_t total_executions_; // 每个worker算执行一次 int64_t optimal_executions_; // 全内存执行次数 From d4f3d56c9e331b3a64e20d5e539fe73f10d0b091 Mon Sep 17 00:00:00 2001 From: csch Date: Mon, 20 Mar 2023 11:03:29 +0800 Subject: [PATCH 06/13] fix some typo error --- src/sql/engine/cmd/ob_alter_system_executor.h | 4 ++-- src/sql/engine/cmd/ob_kill_executor.cpp | 4 ++-- src/sql/engine/cmd/ob_load_data_parser.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sql/engine/cmd/ob_alter_system_executor.h b/src/sql/engine/cmd/ob_alter_system_executor.h index 76b6462e00..10ffdde807 100644 --- a/src/sql/engine/cmd/ob_alter_system_executor.h +++ b/src/sql/engine/cmd/ob_alter_system_executor.h @@ -184,7 +184,7 @@ private: int wait_leader_switch_out_( ObISQLClient &sql_proxy, const obrpc::ObServerList &svr_list); - // construct sql to check waitint-result + // construct sql to check waiting-result // @params[in] svr_list, which servers to stop // @params[in] sql, the sql builded int construct_wait_leader_switch_sql_( @@ -206,7 +206,7 @@ private: int wait_leader_switch_out_( ObISQLClient &sql_proxy, const obrpc::ObAdminZoneArg &arg); - // construct sql to check waitint-result + // construct sql to check waiting-result // @params[in] arg, which zone to stop // @params[out] sql, the sql builded int construct_wait_leader_switch_sql_( diff --git a/src/sql/engine/cmd/ob_kill_executor.cpp b/src/sql/engine/cmd/ob_kill_executor.cpp index 20f4d47232..e0da57faa1 100644 --- a/src/sql/engine/cmd/ob_kill_executor.cpp +++ b/src/sql/engine/cmd/ob_kill_executor.cpp @@ -109,7 +109,7 @@ int ObKillExecutor::get_remote_session_location(const ObKillSessionArg &arg, ObE //execute sql if (OB_ISNULL(sql_proxy) || OB_ISNULL(cur_sess)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("sql proxy or sesion from exec context is NULL", K(ret), K(sql_proxy), K(cur_sess)); + LOG_WARN("sql proxy or session from exec context is NULL", K(ret), K(sql_proxy), K(cur_sess)); } else if (OB_FAIL(generate_read_sql(arg.sess_id_, read_sql))) { LOG_WARN("fail to generate sql", K(ret), K(read_sql), K(*cur_sess), K(arg)); } else if (OB_FAIL(sql_proxy->read(res, read_sql.ptr()))) { @@ -217,7 +217,7 @@ int ObRpcKillSessionP::process() ret = OB_ERR_UNEXPECTED; LOG_WARN("session mgr from gctx is NULL", K(ret)); } else if (OB_FAIL(kill_session(arg, *session_mgr))) { - LOG_WARN("fail to kill sessoin", K(ret), K(arg)); + LOG_WARN("fail to kill session", K(ret), K(arg)); ret = OB_ENTRY_NOT_EXIST == ret ? OB_UNKNOWN_CONNECTION : ret; } else {/*do nothing*/} diff --git a/src/sql/engine/cmd/ob_load_data_parser.h b/src/sql/engine/cmd/ob_load_data_parser.h index a5b6a53403..43a988fa16 100644 --- a/src/sql/engine/cmd/ob_load_data_parser.h +++ b/src/sql/engine/cmd/ob_load_data_parser.h @@ -79,7 +79,7 @@ struct ObCSVGeneralFormat { /** * @brief Fast csv general parser is mysql compatible csv parser - * It support single-byte or multi-byte seperators + * It support single-byte or multi-byte separators * It support utf8, gbk and gb18030 character set */ class ObCSVGeneralParser From d154dc8f4f4411b1e61e938e9020f21572e4d575 Mon Sep 17 00:00:00 2001 From: csch Date: Tue, 28 Mar 2023 16:28:48 +0800 Subject: [PATCH 07/13] fix some typo error --- src/sql/engine/cmd/ob_alter_system_executor.cpp | 10 +++++----- src/sql/engine/cmd/ob_index_executor.cpp | 6 +++--- src/sql/engine/cmd/ob_load_data_utils.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sql/engine/cmd/ob_alter_system_executor.cpp b/src/sql/engine/cmd/ob_alter_system_executor.cpp index 4ed3828390..4b5f5b9457 100644 --- a/src/sql/engine/cmd/ob_alter_system_executor.cpp +++ b/src/sql/engine/cmd/ob_alter_system_executor.cpp @@ -273,7 +273,7 @@ int ObFlushCacheExecutor::execute(ObExecContext &ctx, ObFlushCacheStmt &stmt) int64_t t_id = stmt.flush_cache_arg_.tenant_ids_.at(i); MTL_SWITCH(t_id) { ObPlanCache* plan_cache = MTL(ObPlanCache*); - // not specified db_name, evcit all dbs + // not specified db_name, evict all dbs if (db_num == 0) { ret = plan_cache->flush_plan_cache_by_sql_id(OB_INVALID_ID, sql_id); } else { // evict db by db @@ -921,7 +921,7 @@ int ObAdminZoneExecutor::construct_servers_in_zone_( } else if (OB_FAIL(st_operator.init(&sql_proxy))) { LOG_WARN("fail to init ObServerTableOperator", KR(ret)); } else if (OB_FAIL(st_operator.get(server_statuses))) { - LOG_WARN("build server statused from __all_server failed", KR(ret)); + LOG_WARN("build server statuses from __all_server failed", KR(ret)); } else { for (int64_t idx = 0; OB_SUCC(ret) && idx < server_statuses.count(); ++idx) { if (arg.zone_ == server_statuses.at(idx).zone_) { @@ -1825,7 +1825,7 @@ int ObClearBalanceTaskExecutor::execute(ObExecContext &ctx, ObClearBalanceTaskSt } /* - * change tenant should statisfy the following factors: + * change tenant should satisfy the following factors: * 0. can't change tenant by proxy. * 1. login tenant is sys. * 2. session is not in trans. @@ -2107,7 +2107,7 @@ int ObBackupDatabaseExecutor::execute(ObExecContext &ctx, ObBackupDatabaseStmt & ObString passwd; ObObj value; obrpc::ObBackupDatabaseArg arg; - //rs会尝试更新冻结点的schema_version的intervale 5s + //rs会尝试更新冻结点的schema_version的interval 5s const int64_t SECOND = 1* 1000 * 1000; //1s const int64_t MAX_RETRY_NUM = UPDATE_SCHEMA_ADDITIONAL_INTERVAL / SECOND + 1; if (OB_ISNULL(task_exec_ctx)) { @@ -2471,7 +2471,7 @@ int ObSetRegionBandwidthExecutor::execute(ObExecContext &ctx, ObSetRegionBandwid } else if (OB_FAIL(sql_proxy->write(session_info->get_effective_tenant_id()/*get_priv_tenant_id ???*/, sql_str.ptr(), affected_rows))) { - LOG_WARN("failed to excutet sql write", K(ret), K(sql_str)); + LOG_WARN("failed to execute sql write", K(ret), K(sql_str)); } else { LOG_INFO("ObSetRegionBandwidthExecutor::execute", K(stmt), K(ctx), K(sql_str)); } diff --git a/src/sql/engine/cmd/ob_index_executor.cpp b/src/sql/engine/cmd/ob_index_executor.cpp index d073b03bde..a21c255d0f 100644 --- a/src/sql/engine/cmd/ob_index_executor.cpp +++ b/src/sql/engine/cmd/ob_index_executor.cpp @@ -140,8 +140,8 @@ int ObCreateIndexExecutor::set_drop_index_stmt_str( return ret; } -// is_update_global_indexes = true: drop/truncate partition will trigger index buiding, no need delete failed index at exception -// is_update_global_indexes = false: create index/alter table add index will trigger index buiding, need delete failed index at exception +// is_update_global_indexes = true: drop/truncate partition will trigger index building, no need delete failed index at exception +// is_update_global_indexes = false: create index/alter table add index will trigger index building, need delete failed index at exception int ObCreateIndexExecutor::sync_check_index_status(sql::ObSQLSessionInfo &my_session, obrpc::ObCommonRpcProxy &common_rpc_proxy, const obrpc::ObCreateIndexArg &create_index_arg, @@ -321,7 +321,7 @@ int ObDropIndexExecutor::wait_drop_index_finish( } if (OB_FAIL(ret)) { } else if (OB_FAIL(session.check_session_status())) { - LOG_WARN("session exeception happened", K(ret)); + LOG_WARN("session exception happened", K(ret)); } else { ob_usleep(retry_interval); } diff --git a/src/sql/engine/cmd/ob_load_data_utils.h b/src/sql/engine/cmd/ob_load_data_utils.h index d9491ecc58..2250bcff22 100644 --- a/src/sql/engine/cmd/ob_load_data_utils.h +++ b/src/sql/engine/cmd/ob_load_data_utils.h @@ -241,7 +241,7 @@ private: /* * ObKMPStateMachine is a str matcher - * efficently implimented using KMP algorithem + * efficiently implemented using KMP algorithm * to detect a given str from a char stream */ class ObKMPStateMachine From 8cd9103c3dc5fbef33c0140af25f5679457ec565 Mon Sep 17 00:00:00 2001 From: csch Date: Fri, 7 Apr 2023 17:10:22 +0800 Subject: [PATCH 08/13] fix some typo error --- src/sql/engine/cmd/ob_database_executor.cpp | 2 +- src/sql/engine/cmd/ob_table_executor.cpp | 6 +++--- src/sql/engine/subquery/ob_subplan_filter_op.cpp | 8 ++++---- src/sql/engine/subquery/ob_subplan_scan_op.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sql/engine/cmd/ob_database_executor.cpp b/src/sql/engine/cmd/ob_database_executor.cpp index 1aa4d6bba4..f4b48ed970 100644 --- a/src/sql/engine/cmd/ob_database_executor.cpp +++ b/src/sql/engine/cmd/ob_database_executor.cpp @@ -203,7 +203,7 @@ int ObDropDatabaseExecutor::execute(ObExecContext &ctx, ObDropDatabaseStmt &stmt SQL_ENG_LOG(WARN, "get common rpc proxy failed", K(ret)); } else if (OB_ISNULL(common_rpc_proxy) || OB_ISNULL(ctx.get_my_session())) { ret = OB_ERR_UNEXPECTED; - SQL_ENG_LOG(WARN, "failt to get my session", K(ctx), K(common_rpc_proxy)); + SQL_ENG_LOG(WARN, "fail to get my session", K(ctx), K(common_rpc_proxy)); } else { obrpc::UInt64 affected_row(0); obrpc::ObDropDatabaseRes drop_database_res; diff --git a/src/sql/engine/cmd/ob_table_executor.cpp b/src/sql/engine/cmd/ob_table_executor.cpp index 84c3366240..988c0c6f7c 100644 --- a/src/sql/engine/cmd/ob_table_executor.cpp +++ b/src/sql/engine/cmd/ob_table_executor.cpp @@ -598,7 +598,7 @@ int ObCreateTableExecutor::execute(ObExecContext &ctx, ObCreateTableStmt &stmt) } } - // only CTAS or create temperary table will make session_id != 0. If such table detected, set + // only CTAS or create temporary table will make session_id != 0. If such table detected, set // need ctas cleanup task anyway to do some cleanup jobs if (0 != table_schema.get_session_id()) { LOG_TRACE("CTAS or temporary table create detected", K(table_schema)); @@ -2173,7 +2173,7 @@ int ObTruncateTableExecutor::execute(ObExecContext &ctx, ObTruncateTableStmt &st bool use_parallel_truncate = false; const uint64_t tenant_id = truncate_table_arg.tenant_id_; if (OB_FAIL(check_use_parallel_truncate(truncate_table_arg, use_parallel_truncate))) { - LOG_WARN("fail to check use parallel trunate", KR(ret), K(truncate_table_arg)); + LOG_WARN("fail to check use parallel truncate", KR(ret), K(truncate_table_arg)); } else if (!use_parallel_truncate) { if (OB_FAIL(common_rpc_proxy->truncate_table(truncate_table_arg, res))) { LOG_WARN("rpc proxy alter table failed", K(ret)); @@ -2372,7 +2372,7 @@ int ObFlashBackTableToScnExecutor::execute(ObExecContext &ctx, ObFlashBackTableT LOG_WARN("get common rpc proxy failed", K(ret)); } else if (OB_ISNULL(common_rpc_proxy)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("cmmon rpc proxy should not be null", K(ret)); + LOG_WARN("common rpc proxy should not be null", K(ret)); } else if (OB_FAIL(common_rpc_proxy->flashback_table_to_time_point(arg))) { LOG_WARN("rpc proxy flashback table failed", K(ret)); } diff --git a/src/sql/engine/subquery/ob_subplan_filter_op.cpp b/src/sql/engine/subquery/ob_subplan_filter_op.cpp index ede874a0a0..e9c8ca1126 100644 --- a/src/sql/engine/subquery/ob_subplan_filter_op.cpp +++ b/src/sql/engine/subquery/ob_subplan_filter_op.cpp @@ -596,7 +596,7 @@ int ObSubPlanFilterOp::switch_iterator() } else if (OB_FAIL(child_->switch_iterator())) { //TODO: 目前只支持对非相关子查询做多组迭代器切换,只切换主表 if (OB_ITER_END != ret) { - LOG_WARN("swtich child operator iterator failed", K(ret)); + LOG_WARN("switch child operator iterator failed", K(ret)); } } @@ -918,7 +918,7 @@ int ObSubPlanFilterOp::handle_next_batch_with_px_rescan(const int64_t op_max_bat } if (left_rows_total_cnt != left_rows_.get_row_cnt()) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("left_rows row cnt is unexpectd", K(ret)); + LOG_WARN("left_rows row cnt is unexpected", K(ret)); } } } @@ -1045,7 +1045,7 @@ int ObSubPlanFilterOp::handle_next_batch_with_group_rescan(const int64_t op_max_ LOG_WARN("prepare rescan params failed", K(ret)); } else if (left_rows_total_cnt != left_rows_.get_row_cnt()) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("left_rows row cnt is unexpectd", K(ret)); + LOG_WARN("left_rows row cnt is unexpected", K(ret)); } } @@ -1383,7 +1383,7 @@ int ObSubPlanFilterOp::handle_update_set() } } if (OB_SUCC(ret) && OB_FAIL(row_val.store_row_->to_expr(MY_SPEC.update_set_, eval_ctx_))) { - LOG_WARN("failed to get expr from chunck datum store. ", K(ret)); + LOG_WARN("failed to get expr from chunk datum store. ", K(ret)); } } } diff --git a/src/sql/engine/subquery/ob_subplan_scan_op.h b/src/sql/engine/subquery/ob_subplan_scan_op.h index 00c6f7b181..34d48a88d5 100644 --- a/src/sql/engine/subquery/ob_subplan_scan_op.h +++ b/src/sql/engine/subquery/ob_subplan_scan_op.h @@ -26,7 +26,7 @@ class ObSubPlanScanSpec : public ObOpSpec public: ObSubPlanScanSpec(common::ObIAllocator &alloc, const ObPhyOperatorType type); // project child output to subplan scan column. - // projector_is filled with [child output, scan column] paires, even index is child output, + // projector_is filled with [child output, scan column] pairs, even index is child output, // odd is scan column. e.g.: // [child output, scan column, child output, scan column, ...] ExprFixedArray projector_; From bf3c79679d4e88c76a486fbab9fc65e4578a0ecb Mon Sep 17 00:00:00 2001 From: csch Date: Tue, 18 Apr 2023 11:45:35 +0800 Subject: [PATCH 09/13] fix some typo error --- .../ob_optimizer_stats_gathering_op.cpp | 4 ++-- src/sql/engine/px/ob_px_tenant_target_monitor.cpp | 8 ++++---- src/sql/engine/px/ob_px_worker.cpp | 2 +- .../engine/window_function/ob_window_function_op.cpp | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/sql/engine/opt_statistics/ob_optimizer_stats_gathering_op.cpp b/src/sql/engine/opt_statistics/ob_optimizer_stats_gathering_op.cpp index e832d8c1ee..d3e75cd5d9 100644 --- a/src/sql/engine/opt_statistics/ob_optimizer_stats_gathering_op.cpp +++ b/src/sql/engine/opt_statistics/ob_optimizer_stats_gathering_op.cpp @@ -155,7 +155,7 @@ int ObOptimizerStatsGatheringOp::inner_open() "ColStatNode"))) { LOG_WARN("fail to create column stats map", K(ret)); } - LOG_TRACE("succeed to open optmizer_stats_gathering op", + LOG_TRACE("succeed to open optimizer_stats_gathering op", K(ret), K(map_size), K(MY_SPEC.column_ids_.count()), K(MY_SPEC.table_id_)); } return ret; @@ -353,7 +353,7 @@ int ObOptimizerStatsGatheringOp::calc_column_stats(ObExpr *expr, uint64_t column ret = OB_ERR_UNEXPECTED; LOG_WARN("get unexpected null", K(ret)); } else if (!ObColumnStatParam::is_valid_opt_col_type(expr->obj_meta_.get_type())) { - // do nothing yet, shoul use the plain stats. + // do nothing yet, should use the plain stats. } else if (OB_FAIL(expr->eval(eval_ctx_, datum))) { LOG_WARN("failed to eval expr", K(*expr)); } else if (OB_ISNULL(datum) ) { diff --git a/src/sql/engine/px/ob_px_tenant_target_monitor.cpp b/src/sql/engine/px/ob_px_tenant_target_monitor.cpp index 5f08a0a574..0b0c0b7543 100644 --- a/src/sql/engine/px/ob_px_tenant_target_monitor.cpp +++ b/src/sql/engine/px/ob_px_tenant_target_monitor.cpp @@ -107,7 +107,7 @@ int ObPxTenantTargetMonitor::refresh_statistics(bool need_refresh_all) role_ = FOLLOWER; // from leader to follower, refresh all the statistics if (OB_FAIL(reset_follower_statistics(-1))) { - LOG_WARN("reset statisitcs failed", K(ret)); + LOG_WARN("reset statistics failed", K(ret)); } } if (OB_FAIL(query_statistics(leader))) { @@ -120,7 +120,7 @@ int ObPxTenantTargetMonitor::refresh_statistics(bool need_refresh_all) role_ = LEADER; // from follower to leader or observer is not longer alive, refresh all the statistics if (OB_FAIL(reset_leader_statistics())) { - LOG_WARN("reset statisitcs failed", K(ret)); + LOG_WARN("reset statistics failed", K(ret)); } LOG_INFO("refresh global_target_usage_", K(tenant_id_), K(version_), K(server_), K(need_refresh_all)); } @@ -465,14 +465,14 @@ int ObPxTenantTargetMonitor::apply_target(hash::ObHashMap &work } } if (OB_SUCC(ret) && need_wait) { - // when got no resource, wait for next avaliable resource + // when got no resource, wait for next available resource // // NOTE: when any resource returned , ALL waiting threads are waken up // this is because the returned resource maybe a very big chunk, // which can feed many waiting threads LOG_DEBUG("wait begin", K(wait_time_us), K(session_target), K(req_cnt)); int64_t wait_us = min(wait_time_us, 1000000L); - target_cond_.wait(wait_us); // sleep at most 1sec, in order to check interrput + target_cond_.wait(wait_us); // sleep at most 1sec, in order to check interrupt LOG_DEBUG("wait finish"); } return ret; diff --git a/src/sql/engine/px/ob_px_worker.cpp b/src/sql/engine/px/ob_px_worker.cpp index 4ddbd0f67a..a62307d570 100644 --- a/src/sql/engine/px/ob_px_worker.cpp +++ b/src/sql/engine/px/ob_px_worker.cpp @@ -108,7 +108,7 @@ int ObPxCoroWorker::deep_copy_assign(const ObPxRpcInitTaskArgs &src, ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("fail alloc memory", K(ser_arg_len), KP(ser_ptr), K(ret)); } else if (OB_FAIL(src.serialize(static_cast(ser_ptr), ser_arg_len, ser_pos))) { - LOG_WARN("fail serialzie init task arg", KP(ser_ptr), K(ser_arg_len), K(ser_pos), K(ret)); + LOG_WARN("fail serialize init task arg", KP(ser_ptr), K(ser_arg_len), K(ser_pos), K(ret)); } else if (OB_FAIL(dest.deserialize(static_cast(ser_ptr), ser_pos, des_pos))) { LOG_WARN("fail des task arg", KP(ser_ptr), K(ser_pos), K(des_pos), K(ret)); } else if (ser_pos != des_pos) { diff --git a/src/sql/engine/window_function/ob_window_function_op.cpp b/src/sql/engine/window_function/ob_window_function_op.cpp index 676c25b0bd..0348d42c4d 100644 --- a/src/sql/engine/window_function/ob_window_function_op.cpp +++ b/src/sql/engine/window_function/ob_window_function_op.cpp @@ -101,7 +101,7 @@ int ObWindowFunctionOpInput::sync_wait( // guarantee next wait loop to get lock for one thread has_process = true; if (0 == ATOMIC_AAF(&sync_cnt, 1) % exit_cnt) { - // last thread, it will singal and exit by self + // last thread, it will signal and exit by self shared_info->cond_.signal(); LOG_DEBUG("debug sync_cnt", K(ret), K(sync_cnt), K(lbt())); break; @@ -347,7 +347,7 @@ int ObWindowFunctionOp::AggrCell::trans_self(const ObRADatumStore::StoredRow &ro } if (OB_SUCC(ret)) { - // uppon invoke trans(), forbiden it to reuse the last_result + // uppon invoke trans(), forbidden it to reuse the last_result got_result_ = false; } return ret; @@ -376,7 +376,7 @@ int ObWindowFunctionOp::AggrCell::inv_trans_self(const ObRADatumStore::StoredRow } } if (OB_SUCC(ret)) { - // uppon invoke inv_trans(), forbiden it to reuse the last_result + // uppon invoke inv_trans(), forbidden it to reuse the last_result got_result_ = false; } aggr_processor_.get_removal_info().is_inv_aggr_ = false; @@ -796,7 +796,7 @@ int ObWindowFunctionOp::NonAggrCellNtile::eval(RowsReader &row_reader, LOG_WARN("get_param_int_value failed", K(ret)); } } else if (is_null) { - // return NULL when backets_num is NULL + // return NULL when bucket_num is NULL val.set_null(); } else if (!is_oracle_mode() && !param->obj_meta_.is_numeric_type()) { @@ -1331,7 +1331,7 @@ int ObWindowFunctionOp::init() if (OB_SUCC(ret) && MY_SPEC.is_participator()) { if (wf_info.can_push_down_) { if (common::OB_INVALID_COUNT == next_wf_pby_expr_cnt_to_transmit_) { - // next_wf_pby_expr_cnt_to_transmit_ is for pushdown tranmit to datahub + // next_wf_pby_expr_cnt_to_transmit_ is for pushdown transmit to datahub next_wf_pby_expr_cnt_to_transmit_ = wf_info.partition_exprs_.count(); } if (wf_info.partition_exprs_.count() != prev_pushdown_pby_col_count) { @@ -2342,7 +2342,7 @@ int ObWindowFunctionOp::rd_output_final_row(const int64_t idx, if (OB_FAIL(output_row(idx, &Stores::cur_, &cur_row))) { LOG_WARN("output row failed", K(ret)); } else { - // apply patchs + // apply patches if (patch_first) { reset_first_row_same_order_cache(); for (int64_t wf_idx = 0; OB_SUCC(ret) && wf_idx < MY_SPEC.rd_wfs_.count(); wf_idx++) { From af58e4e5d1e9a77e05b60982eb55d35a49900dce Mon Sep 17 00:00:00 2001 From: csch Date: Wed, 24 May 2023 17:28:25 +0800 Subject: [PATCH 10/13] fix some typo error --- src/sql/engine/px/ob_granule_iterator_op.cpp | 6 +++--- src/sql/engine/px/ob_granule_iterator_op.h | 2 +- src/sql/engine/px/ob_granule_pump.cpp | 12 ++++++------ src/sql/engine/px/ob_px_coord_op.cpp | 4 ++-- src/sql/engine/px/ob_px_dtl_msg.h | 4 ++-- src/sql/engine/px/ob_px_scheduler.cpp | 2 +- src/sql/engine/px/ob_px_sqc_proxy.cpp | 2 +- src/sql/engine/px/ob_px_tenant_target_monitor.h | 2 +- src/sql/engine/px/ob_px_util.cpp | 10 +++++----- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/sql/engine/px/ob_granule_iterator_op.cpp b/src/sql/engine/px/ob_granule_iterator_op.cpp index 1e27086c73..cd02fdab31 100644 --- a/src/sql/engine/px/ob_granule_iterator_op.cpp +++ b/src/sql/engine/px/ob_granule_iterator_op.cpp @@ -50,7 +50,7 @@ int ObGIOpInput::init(ObTaskInfo &task_info) //new parallel framework do not use this interface to set parameters ret = OB_NOT_SUPPORTED; LOG_USER_ERROR(OB_NOT_SUPPORTED, "init gi input"); - LOG_WARN("the interface shoud not be used", K(ret)); + LOG_WARN("the interface should not be used", K(ret)); return ret; } @@ -795,7 +795,7 @@ int ObGranuleIteratorOp::prepare_table_scan() ret = OB_ERR_UNEXPECTED; LOG_WARN("unexpected gi state", K(ret), K(state_)); } else if (FALSE_IT(state_ = GI_GET_NEXT_GRANULE_TASK)) { - } else if (OB_FAIL(get_next_granule_task(true /* prapare */))) { + } else if (OB_FAIL(get_next_granule_task(true /* prepare */))) { if (ret != OB_ITER_END) { LOG_WARN("fail to get next granule task", K(ret)); } else { @@ -979,7 +979,7 @@ int ObGranuleIteratorOp::fetch_rescan_pw_task_infos(const common::ObIArray= pwj_rescan_task_infos_.count())) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("unexected pwj_rescan_task_infos_ count", K(ret), K(rescan_task_idx_), + LOG_WARN("unexpected pwj_rescan_task_infos_ count", K(ret), K(rescan_task_idx_), K(repart_idx), K(pwj_rescan_task_infos_.count()), K(op_ids)); } else { partition_pruned = repart_partition_pruned(pwj_rescan_task_infos_.at(rescan_task_idx_ + repart_idx)); diff --git a/src/sql/engine/px/ob_granule_iterator_op.h b/src/sql/engine/px/ob_granule_iterator_op.h index 82a580f26a..7506f4f13d 100644 --- a/src/sql/engine/px/ob_granule_iterator_op.h +++ b/src/sql/engine/px/ob_granule_iterator_op.h @@ -64,7 +64,7 @@ public: private: int deep_copy_range(ObIAllocator *allocator, const ObNewRange &src, ObNewRange &dst); public: - // the dop, the QC deside the dop before our task send to SQC server + // the dop, the QC decide the dop before our task send to SQC server // but the dop may be change as the worker server don't has enough process. int64_t parallelism_; // 在 affinitize 模式下 GI 需要知道当前 GI 所属的 task id,以拉取对应的 partition 任务 diff --git a/src/sql/engine/px/ob_granule_pump.cpp b/src/sql/engine/px/ob_granule_pump.cpp index f1380f8a47..ca681c444a 100644 --- a/src/sql/engine/px/ob_granule_pump.cpp +++ b/src/sql/engine/px/ob_granule_pump.cpp @@ -222,7 +222,7 @@ int ObGITaskSet::construct_taskset(ObIArray &taskset_tablets, taskset_tablets.count() != taskset_idxs.count() || taskset_tablets.empty() || ss_ranges.count() > 1)) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("taskest count err", K(taskset_tablets.count()), + LOG_WARN("taskset count err", K(taskset_tablets.count()), K(taskset_ranges), K(taskset_idxs), K(ss_ranges.count())); @@ -687,7 +687,7 @@ int ObGranulePump::get_first_tsc_range_cnt(int64_t &cnt) ObGITaskArray &taskset_array = gi_task_array_map_.at(0).taskset_array_; if (taskset_array.empty()) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("unexpeceted taskset array", K(ret)); + LOG_WARN("unexpected taskset array", K(ret)); } else { cnt = taskset_array.at(0).gi_task_set_.count(); } @@ -765,7 +765,7 @@ int ObGranuleSplitter::split_gi_task(ObGranulePumpArgs &args, range_independent); } if (OB_FAIL(ret)) { - LOG_WARN("failed to get graunle task", K(ret), K(ranges), K(tablets), K(is_external_table)); + LOG_WARN("failed to get granule task", K(ret), K(ranges), K(tablets), K(is_external_table)); } else if (OB_FAIL(task_set.construct_taskset(taskset_tablets, taskset_ranges, ss_ranges, @@ -1182,7 +1182,7 @@ int ObPartitionWiseGranuleSplitter::split_granule(ObGranulePumpArgs &args, ObGITaskSet::ObGIRandomType random_type, bool partition_granule /* = true */) { - // 由于FULL PARTITION WISE的splite方法较为特殊(需要对INSERT进行任务切分),而目前的`ObGranuleSplitter`的接口`split_granule`仅仅考虑了TSC的处理, + // 由于FULL PARTITION WISE的split方法较为特殊(需要对INSERT进行任务切分),而目前的`ObGranuleSplitter`的接口`split_granule`仅仅考虑了TSC的处理, // 因此将`ObPartitionWiseGranuleSplitter`的该接口废弃掉 UNUSED(args); UNUSED(scan_ops); @@ -1265,7 +1265,7 @@ int ObPartitionWiseGranuleSplitter::split_granule(ObGranulePumpArgs &args, LOG_WARN("failed to push back task set", K(ret)); } else { // 获得对应的insert/replace op id - LOG_TRACE("splite modify gi task successfully", K(modify_op->get_id())); + LOG_TRACE("split modify gi task successfully", K(modify_op->get_id())); gi_task_array_result.at(index_idx).tsc_op_id_ = modify_op->get_id(); } } @@ -1332,7 +1332,7 @@ int ObPartitionWiseGranuleSplitter::split_insert_gi_task(ObGranulePumpArgs &args taskset_ranges, taskset_idxs, range_independent))) { - LOG_WARN("failed to get insert graunle task", K(ret), K(each_partition_range), K(tablets)); + LOG_WARN("failed to get insert granule task", K(ret), K(each_partition_range), K(tablets)); } else if (OB_FAIL(task_set.construct_taskset(taskset_tablets, taskset_ranges, empty_ss_ranges, taskset_idxs, random_type))) { // INSERT的任务划分一定是 partition wise的,并且INSERT算子每次rescan仅仅需要每一个task对应的partition key, diff --git a/src/sql/engine/px/ob_px_coord_op.cpp b/src/sql/engine/px/ob_px_coord_op.cpp index 293d8a2c0c..9b52152a53 100644 --- a/src/sql/engine/px/ob_px_coord_op.cpp +++ b/src/sql/engine/px/ob_px_coord_op.cpp @@ -675,7 +675,7 @@ int ObPxCoordOp::destroy_all_channel() } /* * actually, the qc and sqc can see the channel id of sqc. - * sqc channel's onwer is SQC, not QC. + * sqc channel's owner is SQC, not QC. * if we release there, all these channel will be release twice. * So, sqc channel will be release by sqc, not qc. * @@ -792,7 +792,7 @@ int ObPxCoordOp::wait_all_running_dfos_exit() if (OB_FAIL(ret)) { } else if (OB_FAIL(loop.process_one_if(&control_channels, nth_channel))) { if (OB_EAGAIN == ret) { - LOG_DEBUG("no msessage, waiting sqc report", K(ret)); + LOG_DEBUG("no message, waiting sqc report", K(ret)); ret = OB_SUCCESS; } else if (OB_ITER_END != ret) { LOG_WARN("fail process message", K(ret)); diff --git a/src/sql/engine/px/ob_px_dtl_msg.h b/src/sql/engine/px/ob_px_dtl_msg.h index db0b929542..a018467dba 100644 --- a/src/sql/engine/px/ob_px_dtl_msg.h +++ b/src/sql/engine/px/ob_px_dtl_msg.h @@ -76,7 +76,7 @@ public: int64_t row_deleted_count_; }; -// keep for compatiablity. never should be used anymore +// keep for compatiblity. never should be used anymore class ObPxTaskMonitorInfo { OB_UNIS_VERSION(1); @@ -414,7 +414,7 @@ public: int rc_; // 错误码 int das_retry_rc_; //record the error code that cause DAS to retry transaction::ObTxExecResult trans_result_; - ObPxTaskMonitorInfoArray task_monitor_info_array_; // deprecated, keep for compatiablity + ObPxTaskMonitorInfoArray task_monitor_info_array_; // deprecated, keep for compatiblity int64_t sqc_affected_rows_; // pdml情况下,一个sqc 影响的行数 ObPxDmlRowInfo dml_row_info_; // SQC存在DML算子时, 需要统计行 信息 uint64_t temp_table_id_; diff --git a/src/sql/engine/px/ob_px_scheduler.cpp b/src/sql/engine/px/ob_px_scheduler.cpp index 2fc0f9d23a..40530b87ca 100644 --- a/src/sql/engine/px/ob_px_scheduler.cpp +++ b/src/sql/engine/px/ob_px_scheduler.cpp @@ -311,7 +311,7 @@ int ObPxMsgProc::on_sqc_finish_msg(ObExecContext &ctx, if (OB_FAIL(ctx.add_temp_table_interm_result_ids(pkt.temp_table_id_, sqc->get_exec_addr(), pkt.interm_result_ids_))) { - LOG_WARN("failed to add temp table interm resuld ids.", K(ret)); + LOG_WARN("failed to add temp table interm result ids.", K(ret)); } else { /*do nothing.*/ } } else { /*do nothing.*/ } if (OB_SUCC(ret)) { diff --git a/src/sql/engine/px/ob_px_sqc_proxy.cpp b/src/sql/engine/px/ob_px_sqc_proxy.cpp index 231bb63965..43030f56b2 100644 --- a/src/sql/engine/px/ob_px_sqc_proxy.cpp +++ b/src/sql/engine/px/ob_px_sqc_proxy.cpp @@ -629,7 +629,7 @@ int ObPxSQCProxy::make_sqc_sample_piece_msg(ObDynamicSamplePieceMsg &msg, bool & int ret = OB_SUCCESS; if (msg.sample_type_ == HEADER_INPUT_SAMPLE && sample_msg_.row_stores_.empty()) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("unexpected row sotres", K(ret)); + LOG_WARN("unexpected row stores", K(ret)); } else if (OB_FAIL(sample_msg_.merge_piece_msg( sqc_ctx_.get_task_count(), msg, diff --git a/src/sql/engine/px/ob_px_tenant_target_monitor.h b/src/sql/engine/px/ob_px_tenant_target_monitor.h index 0548b3c9fa..a567e0548b 100644 --- a/src/sql/engine/px/ob_px_tenant_target_monitor.h +++ b/src/sql/engine/px/ob_px_tenant_target_monitor.h @@ -98,7 +98,7 @@ public: ObPxTargetCond() {} ~ObPxTargetCond() {} public: - // wait when no resource availiable + // wait when no resource available int wait(const int64_t wait_time_us); // notify threads to wakeup and retry void notifyAll(); diff --git a/src/sql/engine/px/ob_px_util.cpp b/src/sql/engine/px/ob_px_util.cpp index ea562128c9..449a368d01 100644 --- a/src/sql/engine/px/ob_px_util.cpp +++ b/src/sql/engine/px/ob_px_util.cpp @@ -1187,7 +1187,7 @@ int ObPXServerAddrUtil::reorder_all_partitions(int64_t table_location_key, ObTabletIdxMap tablet_order_map; if (OB_FAIL(dst_locations.reserve(src_locations.size()))) { LOG_WARN("fail reserve locations", K(ret), K(src_locations.size())); - // virtual table is list parttion now, + // virtual table is list parition now, // no actual partition define, can't traverse // table schema for partition info } else if (!is_virtual_table(ref_table_id) && @@ -1321,7 +1321,7 @@ int ObPXServerAddrUtil::split_parallel_into_task(const int64_t parallel, /// 把剩下的线程安排出去 thread_remain = parallel - total_thread_count; if (thread_remain <= 0) { - // 这种情况是正常的,paralllel < sqc count的时候就会出现这种情况。 + // 这种情况是正常的,parallel < sqc count的时候就会出现这种情况。 } else if (thread_remain > sqc_task_metas.count()) { ret = OB_ERR_UNEXPECTED; LOG_WARN("Thread remain is invalid", K(ret), K(thread_remain), K(sqc_task_metas.count())); @@ -1452,7 +1452,7 @@ int ObPXServerAddrUtil::build_tablet_idx_map( } else if (is_virtual_table(table_schema->get_table_id())) { // In observer 4.2, the table schema of a distributed virtual table will show all_part_num as 1, // whereas in lower versions it would display as 65536. - // For a distrubuted virtual table, we may encounter a situation where part_id is 1 in sqc1, + // For a distributed virtual table, we may encounter a situation where part_id is 1 in sqc1, // part_id is 2 in sqc2 and so on, but the idx_map only contains one item with key=1. // Hence, if we seek with part_id=2, the idx_map will return -4201 (OB_HASH_NOT_EXIST) // will return -4201(OB_HASH_NOT_EXIST). In such cases, we can directly obtain the value that equals part_id + 1. @@ -2886,7 +2886,7 @@ int ObPxEstimateSizeUtil::get_px_size( } } if (ret_size > total_size || OB_FAIL(ret)) { - LOG_WARN("unpexpect status: estimate size is greater than total size", + LOG_WARN("unexpect status: estimate size is greater than total size", K(ret_size), K(total_size), K(ret)); ret_size = total_size; ret = OB_SUCCESS; @@ -3224,7 +3224,7 @@ int ObSlaveMapUtil::build_pkey_affinitized_ch_mn_map(ObDfo &parent, LOG_WARN("unexpected dfo", K(ret), K(parent)); } else if (ObPQDistributeMethod::PARTITION_HASH == child.get_dist_method() || ObPQDistributeMethod::PARTITION_RANGE == child.get_dist_method()) { - LOG_TRACE("build pkey affinitiezed channel map", + LOG_TRACE("build pkey affinitized channel map", K(parent.get_dfo_id()), K(parent.get_sqcs_count()), K(child.get_dfo_id()), K(child.get_sqcs_count())); // ..... From 8c370ea7c9d986dfd9dd694b05a5c0cf240aaf9c Mon Sep 17 00:00:00 2001 From: csch Date: Wed, 24 May 2023 17:28:25 +0800 Subject: [PATCH 11/13] remove extra lines from gitignore --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3b9540bc14..59275ebb1d 100644 --- a/.gitignore +++ b/.gitignore @@ -345,6 +345,3 @@ deps/3rd ############# test ############# test/tmp test/var - -single_ob2 -store From fee6f76595b94166df10c9c8d91d19a602896d60 Mon Sep 17 00:00:00 2001 From: csch Date: Fri, 8 Sep 2023 19:06:41 +0800 Subject: [PATCH 12/13] revert a modification --- src/sql/optimizer/ob_select_log_plan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/optimizer/ob_select_log_plan.cpp b/src/sql/optimizer/ob_select_log_plan.cpp index 19b10dcbc9..57ebe41820 100644 --- a/src/sql/optimizer/ob_select_log_plan.cpp +++ b/src/sql/optimizer/ob_select_log_plan.cpp @@ -6736,7 +6736,7 @@ int ObSelectLogPlan::convert_project_columns(ObSelectStmt *stmt, expr->set_table_name(project_table_item->get_table_name()); if (expr->is_virtual_generated_column()) { if (item->is_geo_ == true && expr->get_srs_id() != SPATIAL_COLUMN_SRID_MASK) { - // spatial index generated column, cannot project from main table + // spatial index generated column, cannot projet from main table if (OB_FAIL(new_col_items.push_back(*item))) { LOG_WARN("failed to push back column item", K(ret)); } From 03cad9e55c6cb5d266caa4f9a3f0d2dbaf0854f3 Mon Sep 17 00:00:00 2001 From: csch Date: Mon, 11 Sep 2023 18:03:59 +0800 Subject: [PATCH 13/13] remove some modification --- src/sql/engine/cmd/ob_partition_executor_utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sql/engine/cmd/ob_partition_executor_utils.cpp b/src/sql/engine/cmd/ob_partition_executor_utils.cpp index e6d3b7fae1..fbdd8dd155 100644 --- a/src/sql/engine/cmd/ob_partition_executor_utils.cpp +++ b/src/sql/engine/cmd/ob_partition_executor_utils.cpp @@ -235,7 +235,7 @@ int check_list_value_duplicate(T **partition_array, !ObSQLUtils::is_same_type_for_compare(tmp_row.get_cell(z).get_meta(), row.get_cell(z).get_meta())) { ret = OB_ERR_PARTITION_VALUE_ERROR; - LOG_WARN("partition value should have same meta info", K(ret), K(tmp_row), K(row), K(j)); + LOG_WARN("partiton value should have same meta info", K(ret), K(tmp_row), K(row), K(j)); } } if (OB_SUCC(ret) && tmp_row == row) { @@ -477,7 +477,7 @@ int ObPartitionExecutorUtils::set_range_part_high_bound(ObExecContext &ctx, ObSEArray range_partition_obj; if (is_subpart && OB_UNLIKELY(!stmt.use_def_sub_part())) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("subpart should be template", K(ret)); + LOG_WARN("subpart shoud be template", K(ret)); } else if (is_subpart && (OB_ISNULL(subpartition_array))) { ret = OB_ERR_UNEXPECTED; LOG_WARN("subpartition_array is NULL", K(ret)); @@ -633,7 +633,7 @@ int ObPartitionExecutorUtils::check_increasing_range_value(T **array, && !rowkey_cur->get_obj_ptr()[j].is_max_value() && !rowkey_last->get_obj_ptr()[j].is_max_value()) { ret = OB_ERR_PARTITION_VALUE_ERROR; - LOG_WARN("partition value should have same meta info", K(ret), K(*rowkey_cur), K(*rowkey_last), K(j)); + LOG_WARN("partiton value should have same meta info", K(ret), K(*rowkey_cur), K(*rowkey_last), K(j)); } } } @@ -1221,7 +1221,7 @@ int ObPartitionExecutorUtils::set_list_part_rows(ObExecContext &ctx, table_schema.get_def_sub_part_num() : table_schema.get_first_part_num(); if (is_subpart && OB_UNLIKELY(!stmt.use_def_sub_part())) { ret = OB_ERR_UNEXPECTED; - LOG_WARN("subpart should be template", K(ret)); + LOG_WARN("subpart shoud be template", K(ret)); } else if (is_subpart && (OB_ISNULL(subpartition_array))) { ret = OB_ERR_UNEXPECTED; LOG_WARN("get null subpartition_array", K(ret));