eolivelli commented on a change in pull request #11171:
URL: https://github.com/apache/pulsar/pull/11171#discussion_r661330131



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/SimpleLoadManagerImpl.java
##########
@@ -317,29 +316,11 @@ private String getDynamicConfigurationFromStore(String 
path, String settingName,
     }
 
     private double getDynamicConfigurationDouble(String path, String 
settingName, double defaultValue) {
-        double result = defaultValue;
-        try {
-            String setting = this.getDynamicConfigurationFromStore(path, 
settingName, null);
-            if (setting != null) {
-                result = Double.parseDouble(setting);
-            }
-        } catch (Exception e) {
-            log.warn("Got exception when parsing configuration from path 
[{}]:", path, e);
-        }
-        return result;
+        return Double.parseDouble(getDynamicConfigurationFromStore(path, 
settingName, String.valueOf(defaultValue)));

Review comment:
       with this new code if there is something wrong written on the store we 
will throw a NumberFormatException
   we should keep the "catch" statement

##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/UnAckedMessageTracker.java
##########
@@ -150,7 +150,7 @@ public void run(Timeout t) throws Exception {
         }, this.tickDurationInMs, TimeUnit.MILLISECONDS);
     }
 
-    public static void addChunkedMessageIdsAndRemoveFromSequnceMap(MessageId 
messageId, Set<MessageId> messageIds,
+    public static void addChunkedMessageIdsAndRemoveFromSequenceMap(MessageId 
messageId, Set<MessageId> messageIds,

Review comment:
       I am not sure it is a good practice to change this unrelated code with 
this patch.
   this patch is focused on LoadBalancer.
   it is better to still to change things only in one module




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