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


##########
cloud/src/meta-service/meta_service_helper.h:
##########
@@ -315,17 +326,17 @@ inline MetaServiceCode cast_as(TxnErrorCode code) {
     [[maybe_unused]] MsStressDecision ms_stress_decision;                      
               \
     if (config::enable_ms_rate_limit || 
config::enable_ms_rate_limit_injection) {             \
         ms_stress_decision = get_ms_stress_decision();                         
               \
-    }                                                                          
               \
-    if ((config::enable_ms_rate_limit || 
config::enable_ms_rate_limit_injection) &&           \
-        RpcRateLimitWhitelist::instance().should_rate_limit(#func_name) &&     
               \
-        ms_stress_decision.under_great_stress()) {                             
               \
-        drop_request = true;                                                   
               \
-        code = MetaServiceCode::MS_TOO_BUSY;                                   
               \
-        msg = ms_stress_decision.debug_string();                               
               \
-        response->mutable_status()->set_code(code);                            
               \
-        response->mutable_status()->set_msg(msg);                              
               \
-        finish_rpc(#func_name, ctrl, request, response);                       
               \
-        return;                                                                
               \

Review Comment:
   This skips MS-wide stress rejection for every caller that does not set 
`support_ms_too_busy`. During a rolling upgrade, old BEs send the same request 
messages without this new field, so when 
`ms_stress_decision.under_great_stress()` is true they will continue executing 
the full RPC instead of being rejected with a legacy code that they can retry 
(the PR description says legacy requests receive `KV_TXN_CONFLICT`). That 
defeats the meta-service-wide backpressure for old BEs exactly while 
compatibility matters. Please keep the stress/whitelist check independent of 
the capability, and only choose the response code based on capability, e.g. 
`MS_TOO_BUSY` for supporting requests and an older retryable code for 
non-supporting requests, with a test for a request lacking the field/bit.



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