yangzhg commented on a change in pull request #6916: URL: https://github.com/apache/incubator-doris/pull/6916#discussion_r739922341
########## File path: be/src/exprs/runtime_filter_rpc.cpp ########## @@ -39,7 +39,12 @@ struct IRuntimeFilter::rpc_context { Status IRuntimeFilter::push_to_remote(RuntimeState* state, const TNetworkAddress* addr) { DCHECK(is_producer()); DCHECK(_rpc_context == nullptr); - PBackendService_Stub* stub = state->exec_env()->brpc_stub_cache()->get_stub(*addr); + std::shared_ptr<PBackendService_Stub> stub( + state->exec_env()->brpc_stub_cache()->get_stub(*addr)); + if (!stub) { + LOG(WARNING) << "Get rpc stub failed, host=" << addr->hostname << ", port=" << addr->port; + return Status::InternalError("get rpc stub failed"); Review comment: The reason why get failed is logged in `state->exec_env()->brpc_stub_cache()->get_stub` ########## File path: be/src/runtime/data_stream_sender.cpp ########## @@ -105,17 +105,18 @@ Status DataStreamSender::Channel::init(RuntimeState* state) { _brpc_request.set_be_number(_be_number); _brpc_timeout_ms = std::min(3600, state->query_options().query_timeout) * 1000; - if (_brpc_dest_addr.hostname == BackendOptions::get_localhost()) { - _brpc_stub = - state->exec_env()->brpc_stub_cache()->get_stub("127.0.0.1", _brpc_dest_addr.port); - } else { - _brpc_stub = state->exec_env()->brpc_stub_cache()->get_stub(_brpc_dest_addr); - } // In bucket shuffle join will set fragment_instance_id (-1, -1) // to build a camouflaged empty channel. the ip and port is '0.0.0.0:0" // so the empty channel not need call function close_internal() _need_close = (_fragment_instance_id.hi != -1 && _fragment_instance_id.lo != -1); + if (_need_close) { + _brpc_stub = state->exec_env()->brpc_stub_cache()->get_stub(_brpc_dest_addr); + if (!_brpc_stub) { + LOG(WARNING) << "Get rpc stub failed, dest_addr=" << _brpc_dest_addr; + return Status::InternalError("get rpc stub failed"); Review comment: The reason why get failed is logged in state->exec_env()->brpc_stub_cache()->get_stub -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org