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



##########
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:
       Yes, this was why I am considering this part. If the existing resource 
group is 
   
   ```java
   private int publishRateInMsgs = 10; 
   private long publishRateInBytes = 10; 
   private int dispatchRateInMsgs = 10; 
   private long dispatchRateInBytes = 10;
   ```
   
   And want to remove the limit for `dispatchRateInMsgs`, the new resource 
group should be:
   
   ```java
   private int publishRateInMsgs = 10; 
   private long publishRateInBytes = 10; 
   private int dispatchRateInMsgs = -1; 
   private long dispatchRateInBytes = 10;
   ```
   
   But we can't apply `dispatchRateInMsgs = -1` in your fix right?




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


Reply via email to