hello-stephen commented on code in PR #70910:
URL: https://github.com/apache/doris/pull/70910#discussion_r4720412933
##########
be/src/service/http/action/stream_load.cpp:
##########
@@ -822,11 +845,17 @@ Status StreamLoadAction::_process_put(HttpRequest*
http_req,
#ifndef BE_TEST
// plan this load
- TNetworkAddress master_addr = _exec_env->cluster_info()->master_fe_addr;
int64_t stream_load_put_start_time = MonotonicNanos();
+ const auto master = _exec_env->cluster_info()->master_fe_addr;
+ const auto planner = ctx->group_commit ?
_select_group_commit_planner(master) : master;
+ DBUG_EXECUTE_IF("StreamLoadAction.require_direct_group_commit_plan", {
+ if (ctx->group_commit && planner == master) {
+ return Status::InternalError(
+ "Expected direct group commit planning on a non-master
FE");
+ }
+ });
RETURN_IF_ERROR(ThriftRpcHelper::rpc<FrontendServiceClient>(
- master_addr.hostname, master_addr.port,
- [&request, ctx](FrontendServiceConnection& client) {
+ planner.hostname, planner.port, [&request,
ctx](FrontendServiceConnection& client) {
Review Comment:
[P2] Restore master fallback for an unreachable selected FE
A follower or observer can stop after its last successful heartbeat;
`HeartbeatMgr` sends the previous iteration's frontend snapshot, so that FE
remains eligible here. This fixed-address `ThriftRpcHelper` call returns an
initial connection failure immediately and retries transport failures only
against the same selected endpoint. `RETURN_IF_ERROR` then aborts the load
despite a healthy reachable master. Previously, `forwardGroupCommitStreamLoad`
caught the follower connection failure and planned locally on the master. Retry
planning at the current master when a non-master planner has a connection or
transport failure, and cover a planner disappearing after its heartbeat.
--
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]