1.explain performance mode打印ndp下推信息
2.去除rpc错误的无效打印
This commit is contained in:
@ -267,21 +267,17 @@ NdpRetCode NdpIoSlot::GetResp(NdpPageHeader& pages, int& pageNum, BlockNumber& s
|
||||
pageNum = 0;
|
||||
|
||||
if (respRet != NdpRetCode::NDP_OK) {
|
||||
ereport(WARNING, (errmsg("rpc response status is illegal %d, RPC status %d",
|
||||
static_cast<int>(respRet), static_cast<int>(rpcStatus))));
|
||||
return respRet;
|
||||
}
|
||||
|
||||
auto rpcResp = reinterpret_cast<NdpIOResponse*>(respMsg.data);
|
||||
if (rpcResp == nullptr) {
|
||||
ereport(WARNING, (errmsg("rpc response is null.")));
|
||||
return NdpRetCode::NDP_RETURN_FAILED;
|
||||
}
|
||||
#ifdef ENABLE_SSL
|
||||
resp = reinterpret_cast<NdpIOResponse*>(respMsg.data);
|
||||
#endif
|
||||
if (rpcResp->status != 0) {
|
||||
ereport(WARNING, (errmsg("backend handle IO failed, status is %u.", resp->status)));
|
||||
return NdpRetCode::NDP_RETURN_STATUS_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ static bool show_scan_distributekey(const Plan* plan)
|
||||
}
|
||||
#endif /* ENABLE_MULTIPLE_NODES */
|
||||
static void show_unique_check_info(PlanState *planstate, ExplainState *es);
|
||||
static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate);
|
||||
static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate, StringInfo str, bool is_pretty);
|
||||
|
||||
/*
|
||||
* ExplainQuery -
|
||||
@ -2396,6 +2396,11 @@ static void ExplainNode(
|
||||
appendStringInfo(tmpName, " stream_level:%d ", stream_plan->stream_level);
|
||||
}
|
||||
|
||||
/* explain ndpplugin activities */
|
||||
if (ndp_pushdown_hook) {
|
||||
show_ndpplugin_statistic(es, planstate, tmpName, is_pretty);
|
||||
}
|
||||
|
||||
if (is_pretty) {
|
||||
|
||||
StringInfoData pretty_plan_name;
|
||||
@ -2498,11 +2503,6 @@ static void ExplainNode(
|
||||
}
|
||||
}
|
||||
|
||||
/* explain ndpplugin activities */
|
||||
if (ndp_pushdown_hook) {
|
||||
show_ndpplugin_statistic(es, planstate);
|
||||
}
|
||||
|
||||
/*
|
||||
* We have to forcibly clean up the instrumentation state because we
|
||||
* haven't done ExecutorEnd yet. This is pretty grotty ...
|
||||
@ -10955,7 +10955,7 @@ static void show_unique_check_info(PlanState *planstate, ExplainState *es)
|
||||
}
|
||||
}
|
||||
|
||||
static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate)
|
||||
static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate, StringInfo str, bool is_pretty)
|
||||
{
|
||||
Plan* plan = planstate->plan;
|
||||
if (!plan->ndp_pushdown_optimized &&
|
||||
@ -10968,7 +10968,12 @@ static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate)
|
||||
if (desc && !desc->ndp_pushdown_optimized) {
|
||||
return;
|
||||
}
|
||||
appendStringInfo(es->str, " NDPpushdown");
|
||||
|
||||
if (is_pretty) {
|
||||
appendStringInfo(str, " NDPpushdown");
|
||||
} else {
|
||||
appendStringInfo(es->str, " NDPpushdown");
|
||||
}
|
||||
|
||||
if (!es->analyze) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user