[FEAT MERGE] Fix the error code loss and overwriting issues on the master branch
Co-authored-by: jingtaoye35 <1255153887@qq.com> Co-authored-by: fkuner <784819644@qq.com> Co-authored-by: lucky-sinx <2549261744@qq.com>
This commit is contained in:
@ -276,7 +276,7 @@ struct ObGetTableIdOp
|
||||
} else if (OB_ISNULL(plan = dynamic_cast<ObPhysicalPlan *>(entry.second))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("unexpected null plan", K(ret), K(plan));
|
||||
} else if (plan->get_base_table_version(table_id_, version)) {
|
||||
} else if (OB_FAIL(plan->get_base_table_version(table_id_, version))) {
|
||||
LOG_WARN("failed to get base table version", K(ret));
|
||||
} else if (version > 0) {
|
||||
plan->set_is_expired(true);
|
||||
@ -1092,6 +1092,7 @@ int ObPlanCache::get_plan_cache(ObILibCacheCtx &ctx,
|
||||
}
|
||||
// check the returned error code and whether the plan has expired
|
||||
if (OB_FAIL(check_after_get_plan(ret, ctx, guard.cache_obj_))) {
|
||||
// overwrite ret, ret used in check_after_get_plan
|
||||
SQL_PC_LOG(TRACE, "failed to check after get plan", K(ret));
|
||||
}
|
||||
if (OB_FAIL(ret) && OB_NOT_NULL(guard.cache_obj_)) {
|
||||
@ -2709,6 +2710,7 @@ void ObPlanCacheEliminationTask::run_free_cache_obj_task()
|
||||
int64_t safe_timestamp = INT64_MAX;
|
||||
if (observer::ObGlobalReqTimeService::get_instance()
|
||||
.get_global_safe_timestamp(safe_timestamp)) {
|
||||
// ignore ret
|
||||
SQL_PC_LOG(ERROR, "failed to get global safe timestamp", K(ret));
|
||||
} else if (OB_FAIL(plan_cache_->dump_deleted_objs<DUMP_ALL>(deleted_objs, safe_timestamp))) {
|
||||
SQL_PC_LOG(WARN, "failed to traverse hashmap", K(ret));
|
||||
@ -2718,6 +2720,7 @@ void ObPlanCacheEliminationTask::run_free_cache_obj_task()
|
||||
tot_mem_used += deleted_objs.at(k).mem_used_;
|
||||
} // end for
|
||||
if (tot_mem_used >= ((plan_cache_->get_mem_limit() / 100) * 30)) {
|
||||
// ignore ret
|
||||
LOG_ERROR("Cache Object Memory Leaked Much!!!", K(tot_mem_used),
|
||||
K(plan_cache_->get_mem_limit()), K(deleted_objs), K(safe_timestamp));
|
||||
} else if (deleted_objs.count() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user