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


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceProxy.java:
##########
@@ -263,16 +274,16 @@ public <Response> Response executeRequest(String 
methodName, Function<MetaServic
      * Execute RPC with comprehensive metrics tracking.
      * Tracks: total calls, failures, latency
      */
-    private <Response> Response executeWithMetrics(String methodName, 
Function<MetaServiceClient, Response> function)
-            throws RpcException {
+    private <Response> Response executeWithMetrics(String methodName, 
Function<MetaServiceClient, Response> function,
+            Function<Response, Cloud.MetaServiceResponseStatus> 
statusExtractor) throws RpcException {
         long startTime = System.currentTimeMillis();
         if (MetricRepo.isInit && Config.isCloudMode()) {
             CloudMetrics.META_SERVICE_RPC_ALL_TOTAL.increase(1L);
             
CloudMetrics.META_SERVICE_RPC_TOTAL.getOrAdd(methodName).increase(1L);
         }
 
         try {
-            Response response = w.executeRequest(methodName, function);
+            Response response = w.executeRequest(methodName, function, 
statusExtractor);
             if (MetricRepo.isInit && Config.isCloudMode()) {

Review Comment:
   The new response-status retry only applies to callers that go through this 
helper, but `getInstance()` still has its separate implementation above and 
returns `client.getInstance(request)` directly. `GetInstanceResponse` carries 
`MetaServiceResponseStatus` too, and the meta-service `get_instance` handler 
can set `MS_TOO_BUSY` through the shared rate-limit preprocessor when that RPC 
is whitelisted or the whitelist is empty. Callers such as 
`CloudSystemInfoService.getCloudInstance()`/`getInstanceId()` then treat the 
non-OK response as a failed instance lookup instead of retrying. Please route 
`getInstance` through this status-extractor retry path, or add equivalent 
handling plus a focused unit test.



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