narendly commented on a change in pull request #519: Refine the rebalance scope
calculating logic in the WAGED rebalancer.
URL: https://github.com/apache/helix/pull/519#discussion_r339174882
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/changedetector/ResourceChangeSnapshot.java
##########
@@ -113,4 +123,26 @@
ClusterConfig getClusterConfig() {
return _clusterConfig;
}
+
+ // Trim the IdealState to exclude any controller modified information.
+ private IdealState trimIdealState(IdealState originalIdealState) {
+ // Clone the IdealState to avoid modifying the objects in the Cluster Data
Cache, which might
+ // be used by the other stages in the pipeline.
+ IdealState trimmedIdealState = new
IdealState(originalIdealState.getRecord());
+ switch (originalIdealState.getRebalanceMode()) {
+ case FULL_AUTO:
+ // For FULL_AUTO resources, both map fields and list fields are not
considered as data input
+ // for the controller.
Review comment:
Also add:
The controller will write to mapFields and listFields meaning they will be
overwritten by the controller...
----------------------------------------------------------------
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]