gavinchou commented on code in PR #45668:
URL: https://github.com/apache/doris/pull/45668#discussion_r1900424251


##########
be/src/cloud/cloud_meta_mgr.cpp:
##########
@@ -139,15 +139,89 @@ class MetaServiceProxy {
 public:
     static Status get_client(std::shared_ptr<MetaService_Stub>* stub) {
         TEST_SYNC_POINT_RETURN_WITH_VALUE("MetaServiceProxy::get_client", 
Status::OK(), stub);
-        return get_pooled_client(stub);
+        return get_pooled_client(stub, nullptr);
+    }
+
+    static Status get_proxy(MetaServiceProxy** proxy) {
+        // The 'stub' is a useless parameter, added only to reuse the 
`get_pooled_client` function.
+        std::shared_ptr<MetaService_Stub> stub;
+        return get_pooled_client(&stub, proxy);
+    }
+
+    void set_unhealthy() {
+        std::unique_lock lock(_mutex);
+        maybe_unhealthy = true;
+    }
+
+    bool need_reconn(long now) {
+        return maybe_unhealthy &&
+               ((now - last_reconn_time_ms.front()) > 
config::meta_service_rpc_reconn_interval_ms);

Review Comment:
   ```suggestion
                  ((now - last_reconn_time_ms.front()) > 
config::meta_service_rpc_reconnect_interval_ms);
   ```



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

Reply via email to