[FEAT MERGE]logical plan move to plan cache module add feedback into to plan
This commit is contained in:
		| @ -697,6 +697,14 @@ int ObRemoteBaseExecuteP<T>::execute_with_sql(ObRemoteTask &task) | ||||
|         NG_TRACE_EXT(execute_task, OB_ID(task), task, OB_ID(stmt_type), plan->get_stmt_type()); | ||||
|         if (OB_FAIL(execute_remote_plan(exec_ctx_, *plan))) { | ||||
|           LOG_WARN("execute remote plan failed", K(ret), K(task), K(exec_ctx_.get_das_ctx().get_snapshot())); | ||||
|         } else if (plan->need_record_plan_info()) { | ||||
|           if(exec_ctx_.get_feedback_info().is_valid() && | ||||
|              plan->get_logical_plan().is_valid() && | ||||
|              OB_FAIL(plan->set_feedback_info(exec_ctx_))) { | ||||
|             LOG_WARN("failed to set feedback info", K(ret)); | ||||
|           } else { | ||||
|             plan->set_record_plan_info(false); | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|       // =============================================================== | ||||
| @ -775,6 +783,10 @@ int ObRemoteBaseExecuteP<T>::base_before_response(common::ObScanner &scanner) | ||||
|                 "tx_desc", *session->get_tx_desc()); | ||||
|     } | ||||
|   } | ||||
|   if (OB_SUCCESS == exec_errcode_ && is_execute_remote_plan()) { | ||||
|     ObExecFeedbackInfo &fb_info = scanner.get_feedback_info(); | ||||
|     exec_errcode_ = fb_info.assign(exec_ctx_.get_feedback_info()); | ||||
|   } | ||||
|   exec_ctx_.hide_session(); | ||||
|   // return a scanner no matter success or fail, set err_code to scanner | ||||
|   if (OB_SUCCESS != exec_errcode_) { | ||||
|  | ||||
| @ -115,6 +115,13 @@ int ObRemoteTaskExecutor::execute(ObExecContext &query_ctx, ObJob *job, ObTaskIn | ||||
|                                         has_transfer_err, | ||||
|                                         plan_ctx->get_phy_plan()); | ||||
|       ret = COVER_SUCC(tmp_ret); | ||||
|  | ||||
|       if (OB_SUCC(ret)) { | ||||
|         ObExecFeedbackInfo &fb_info = handler->get_result()->get_feedback_info(); | ||||
|         if (OB_FAIL(query_ctx.get_feedback_info().merge_feedback_info(fb_info))) { | ||||
|           LOG_WARN("fail to merge exec feedback info", K(ret)); | ||||
|         } | ||||
|       } | ||||
|       NG_TRACE_EXT(remote_task_completed, OB_ID(ret), ret, | ||||
|                    OB_ID(runner_svr), task_info->get_task_location().get_server(), | ||||
|                    OB_ID(task), task); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 zzg19950727
					zzg19950727