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


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/rpc/MetaServiceRpcRateLimiter.java:
##########
@@ -77,6 +92,19 @@ long acquire(String methodName, int permits) throws 
RpcException {
         }
 
         long waitMs = TimeUnit.NANOSECONDS.toMillis(nanosToWait);

Review Comment:
   [P1] Reset dry-run reservation debt before enforcing
   
   Resilience4j's `reservePermission` is stateful: when the estimated wait fits 
the timeout it subtracts permits, but this dry-run branch returns immediately. 
Because the mutable dry-run flag is not part of the snapshot/holder match, 
flipping it to false reuses debt created by already-admitted dry-run RPCs. For 
example, with a 60s burst and 1s timeout, a weighted dry-run near refresh can 
reserve the next period; after the flip, that refresh only repays the negative 
balance and real RPCs can reject for about 59s. Please atomically 
reset/recreate holders as part of the true-to-false transition (or keep 
separate shadow/enforcing state) and add a positive-wait transition 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