lei-xia commented on a change in pull request #941: Fix unexpceted partition
movements in the CrushEd strategy.
URL: https://github.com/apache/helix/pull/941#discussion_r406857011
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/dataproviders/ResourceControllerDataProvider.java
##########
@@ -294,4 +304,32 @@ public void clearMonitoringRecords() {
_missingTopStateMap.clear();
_lastTopStateLocationMap.clear();
}
+
+ /**
+ * If the list items are the same, return the stable partition list cache.
Otherwise, refresh
+ * the cache with new list and return the new list.
+ * This is for a backward compatible workaround to fix
https://github.com/apache/helix/issues/940.
+ *
+ * @param resourceName
+ * @param newPartitionSet
+ */
+ public List<String> getOrSetStablePartitionList(String resourceName,
Review comment:
This method is confusing. Another option is to call this method when the
cluster data cache refresh IdealStates, this can keep all logic within data
cache.
i.e,
split to two methods: 1) refreshPartitionList(), this is private. and 2)
getPartitionList(), this is public and used by the rebalancer (and probably in
other stages too where a partition list is needed, so there will be consistent
over all stages).
----------------------------------------------------------------
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]