[HELIX-676] Don't clear list fields in PersistAssignmentStage This clean up operation is dangerous because it may remove the list fields key. This may lead to rebalance calculation impossible.
Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/0147f946 Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/0147f946 Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/0147f946 Branch: refs/heads/master Commit: 0147f94664bc8dc98b73ff70f36f7bb3b2234723 Parents: 08ff9d0 Author: Jiajun Wang <jjw...@linkedin.com> Authored: Wed Feb 28 14:47:03 2018 -0800 Committer: jiajunwang <ericwang1...@gmail.com> Committed: Thu Mar 8 17:30:04 2018 -0800 ---------------------------------------------------------------------- .../org/apache/helix/controller/stages/PersistAssignmentStage.java | 1 - 1 file changed, 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/0147f946/helix-core/src/main/java/org/apache/helix/controller/stages/PersistAssignmentStage.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/PersistAssignmentStage.java b/helix-core/src/main/java/org/apache/helix/controller/stages/PersistAssignmentStage.java index 7281430..8d188ec 100644 --- a/helix-core/src/main/java/org/apache/helix/controller/stages/PersistAssignmentStage.java +++ b/helix-core/src/main/java/org/apache/helix/controller/stages/PersistAssignmentStage.java @@ -121,7 +121,6 @@ public class PersistAssignmentStage extends AbstractBaseStage { // Note that default merge will keep old values in the maps or lists unchanged, which is not desired. current.getMapFields().clear(); current.getMapFields().putAll(idealState.getRecord().getMapFields()); - current.getListFields().clear(); current.getListFields().putAll(idealState.getRecord().getListFields()); } return current;