lei-xia commented on a change in pull request #920: Refresh live instance while
fetching the current state information in the RoutingTableProvider
URL: https://github.com/apache/helix/pull/920#discussion_r401181493
##########
File path:
helix-core/src/main/java/org/apache/helix/spectator/RoutingDataCache.java
##########
@@ -79,6 +79,17 @@ public synchronized void refresh(HelixDataAccessor
accessor) {
.get(HelixConstants.ChangeType.CURRENT_STATE)) {
long start = System.currentTimeMillis();
_propertyDataChangedMap.put(HelixConstants.ChangeType.CURRENT_STATE,
false);
+ /**
+ * Workaround of https://github.com/apache/helix/issues/919.
+ * Why it is workaround?
+ * 1. Before a larger scale refactoring, to minimize the impact on cache
logic, this change
+ * introduces extra read to update the liveInstance list before
processing current states.
+ * 2. This change does not handle the corresponding callback handlers,
which should also be
+ * registered when a new liveInstance node is found.
+ * TODO: Refactor cache processing logic and also refine the callback
handler registration
+ * TODO: logic.
+ **/
+ _liveInstancePropertyCache.refresh(accessor);
Review comment:
Why do not we refresh the liveInstance when there is CurrentState change at
the BasicClusterDataCache?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]