Copilot commented on code in PR #15679:
URL: https://github.com/apache/dubbo/pull/15679#discussion_r2335245333


##########
dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/tps/DefaultTPSLimiter.java:
##########
@@ -39,27 +39,32 @@ public class DefaultTPSLimiter implements TPSLimiter {
 
     @Override
     public boolean isAllowable(URL url, Invocation invocation) {
+        boolean isMethodLevelTpsConfigured =
+                url.hasMethodParameter(RpcUtils.getMethodName(invocation), 
TPS_LIMIT_RATE_KEY);
+        String key = isMethodLevelTpsConfigured
+                ? url.getServiceKey() + "#" + 
RpcUtils.getMethodName(invocation)
+                : url.getServiceKey();

Review Comment:
   [nitpick] The hardcoded '#' separator could be extracted as a constant to 
improve maintainability and make the key format more explicit.



-- 
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: notifications-unsubscr...@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to