github-actions[bot] commented on code in PR #70910:
URL: https://github.com/apache/doris/pull/70910#discussion_r4675901484
##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -123,7 +122,6 @@
import org.apache.doris.nereids.trees.plans.distribute.PipelineDistributedPlan;
import org.apache.doris.nereids.trees.plans.distribute.worker.job.AssignedJob;
import org.apache.doris.persist.gson.GsonUtils;
-import org.apache.doris.planner.GroupCommitPlanner;
import org.apache.doris.planner.OlapTableSink;
import org.apache.doris.qe.ConnectContext;
Review Comment:
[P2] Fall back when the route target is no longer master
`getGroupCommitPlanRoute` returns `NOT_MASTER` before selecting a follower,
and the BE propagates that status from the optional lookup. During FE leader
failover, a BE can still have the former master in `master_fe_addr` while that
FE remains reachable as a follower; the previous single `streamLoadPut` call
would plan there because it only forwards when `Env.isMaster()` and otherwise
generates the plan locally. This new preflight instead aborts the load until
the next heartbeat updates the BE. Treat `NOT_MASTER` as an empty route (or
retry with the current FE role) so the optional optimization does not turn the
failover window into a group-commit outage.
##########
be/src/service/http/action/stream_load.cpp:
##########
@@ -66,6 +68,7 @@
#include "storage/storage_engine.h"
#include "util/byte_buffer.h"
#include "util/client_cache.h"
+#include "util/debug_points.h"
#include "util/load_util.h"
#include "util/string_util.h"
Review Comment:
[P2] Avoid the route RPC when follower forwarding is disabled
`enable_forward_group_commit_stream_load_to_follower` defaults to `false`,
but this branch calls `get_group_commit_planning_follower` for every
group-commit request. The FE then returns an empty route immediately, so the
normal disabled configuration now does two FE RPCs instead of the old single
`streamLoadPut`; a slow route connection can also consume the 10-second lookup
timeout before the same master call. Gate this lookup using the forwarding
setting (while preserving its dynamic behavior), or make the disabled path
zero-cost.
##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -390,7 +388,6 @@ public class FrontendServiceImpl implements
FrontendService.Iface {
CertificateRuntimeAuthFactory.getInstance();
Review Comment:
[P2] Preserve missing-table errors from the normal planner path
With forwarding enabled and any alive follower, `selectPlanningFollower`
throws `DdlException` for a missing or non-OLAP table. This catch converts it
to `ANALYSIS_ERROR` and the BE returns before `streamLoadPut` runs. Before this
RPC existed, `forwardGroupCommitStreamLoad` treated that precheck exception as
no-route and the normal planner returned its `NOT_FOUND`/metadata error. Keep
metadata lookup failures as an empty route (or preserve the normal `NOT_FOUND`
status) so this optimization does not change the API error classification.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]