You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/03/02 09:38:10 UTC

[GitHub] [incubator-inlong] pocozh commented on a change in pull request #2811: [INLONG-2802][DataProxy] Fix mx.properties local file updating too often

pocozh commented on a change in pull request #2811:
URL: https://github.com/apache/incubator-inlong/pull/2811#discussion_r817510990



##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/ConfigManager.java
##########
@@ -308,8 +310,12 @@ private boolean checkWithManager(String host, String proxyClusterName) {
                     mqConfig.putAll(clusterSet.get(0).getParams());

Review comment:
       done

##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/ConfigManager.java
##########
@@ -123,7 +123,8 @@ private boolean updatePropertiesHolder(Map<String, String> result,
             String oldValue = addElseRemove
                     ? tmpHolder.put(entry.getKey(), entry.getValue()) : tmpHolder.remove(entry.getKey());
             // if addElseRemove is false, that means removing item, changed is true.
-            if (oldValue == null || !oldValue.equals(entry.getValue()) || !addElseRemove) {
+            if ((oldValue == null && entry.getValue() != null) || !oldValue.equals(entry.getValue())
+                    || !addElseRemove) {

Review comment:
       done




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

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