jiajunwang commented on a change in pull request #365: Fix RoutingTableProvider 
statePropagationLatency metric reporting bug
URL: https://github.com/apache/helix/pull/365#discussion_r309839047
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/common/caches/CurrentStateCache.java
 ##########
 @@ -136,8 +136,8 @@ private void refreshCurrentStatesCache(HelixDataAccessor 
accessor,
     cachedKeys.retainAll(currentStateKeys);
 
     Map<PropertyKey, CurrentState> newStateCache = Collections.unmodifiableMap(
-        refreshProperties(accessor, new ArrayList<>(reloadKeys), new 
ArrayList<>(cachedKeys),
-            _currentStateCache));
+        refreshProperties(accessor, reloadKeys, new ArrayList<>(cachedKeys),
+            _currentStateCache, reloadKeys));
 
 Review comment:
   What you need is a list contains the reloaded key. It does not have to be 
the original "reloadKeys". The current code put the same object as the input 
and the output. That means the input will be modified. This just loses the 
benefit of splitting the input and the output parameters.
   Actually, I'm OK with both design: 1. one parameter, or 2. two parameters 
but sending with different objects. Prefered 2nd one.
   However, two parameters but sending the same object looks strange.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to