github-actions[bot] commented on code in PR #70693:
URL: https://github.com/apache/doris/pull/70693#discussion_r4604266482


##########
be/src/util/brpc_client_cache.h:
##########
@@ -256,7 +257,11 @@ class BrpcClientCache {
                                                const std::string& 
connection_group = "",
                                                int connect_timeout_ms = 2000, 
int max_retry = 10) {
         brpc::ChannelOptions options;
-        Status status = 
doris::client::configure_brpc_channel_options(&options);
+        // Function endpoints are external services, unlike backend-to-backend 
cluster channels.
+        constexpr auto purpose = std::is_same_v<T, PFunctionService_Stub>
+                                         ? client::RpcPurpose::EXTERNAL_SERVICE
+                                         : client::RpcPurpose::INTERNAL_RPC;
+        Status status = client::configure_brpc_channel_options(&options, 
purpose);

Review Comment:
   [P2] Return a cache failure when BRPC TLS setup is invalid
   
   With private BRPC TLS active, losing a configured certificate/key/CA file 
after startup makes `configure_channel()` return non-OK, which this cache 
throws as a raw `Status`. A subsequent cache miss can therefore terminate the 
BE: for example, `PInternalService::fetch_remote_tablet_schema()` calls 
`get_client()` inside its `_heavy_work_pool` callback, and neither that 
callback nor `WorkThreadPool::work_thread()`/`Thread::supervise_thread()` 
catches the throw. This failure was unreachable when the OSS provider always 
returned OK. Convert setup errors to the cache's normal failure result and 
cover failed acquisition/recreation through `BrpcClientCache`. This is distinct 
from the repaired Thrift factory exception path.



-- 
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]

Reply via email to