yuruguo commented on a change in pull request #13543: URL: https://github.com/apache/pulsar/pull/13543#discussion_r780669644
########## 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: Good point, you are right! `-1` is an occupied value, we can‘t judge whether `-1` is the default value or user-specified value, so maybe we should remove the `-1` and judge by `null`, redefine `ResourceGroup` ``` public class ResourceGroup { private int publishRateInMsgs = -1; private long publishRateInBytes = -1; private int dispatchRateInMsgs = -1; private long dispatchRateInBytes = -1; } ``` -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org