You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/30 01:02:36 UTC

[GitHub] [pulsar] yuruguo commented on a change in pull request #13543: [Broker] Other old values are still valid when updating resource group

yuruguo commented on a change in pull request #13543:
URL: https://github.com/apache/pulsar/pull/13543#discussion_r776537172



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ResourceGroupsBase.java
##########
@@ -63,10 +63,18 @@ protected void internalUpdateResourceGroup(String rgName, ResourceGroup rgConfig
             /*
              * assuming read-modify-write
              */
-            resourceGroup.setPublishRateInMsgs(rgConfig.getPublishRateInMsgs());
-            resourceGroup.setPublishRateInBytes(rgConfig.getPublishRateInBytes());
-            resourceGroup.setDispatchRateInMsgs(rgConfig.getDispatchRateInMsgs());
-            resourceGroup.setDispatchRateInBytes(rgConfig.getDispatchRateInBytes());
+            if (rgConfig.getPublishRateInMsgs() != -1) {

Review comment:
       The default value of `rate` is `- 1`
   https://github.com/apache/pulsar/blob/ef8120f0ae16d829036292dc0b50640bc515ae98/pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdResourceGroups.java#L87-L106
   https://github.com/apache/pulsar/blob/ef8120f0ae16d829036292dc0b50640bc515ae98/pulsar-client-admin-api/src/main/java/org/apache/pulsar/common/policies/data/PublishRate.java#L28-L37
   which means not take effect or not limit.




-- 
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-unsubscribe@pulsar.apache.org

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