You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2018/03/25 21:44:54 UTC

[3/6] helix git commit: Remove empty resource entry if there is no partition disabled for this instance

Remove empty resource entry if there is no partition disabled for this instance


Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/284c66d0
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/284c66d0
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/284c66d0

Branch: refs/heads/master
Commit: 284c66d07c38ac43b5aa408165b50f7ce8e1c36a
Parents: c1ab0b5
Author: Junkai Xue <jx...@linkedin.com>
Authored: Tue Feb 27 14:24:38 2018 -0800
Committer: dasahcc <ju...@gmail.com>
Committed: Sun Mar 25 14:43:42 2018 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/helix/model/InstanceConfig.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/284c66d0/helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java b/helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java
index 4343006..a26c039 100644
--- a/helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java
+++ b/helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java
@@ -412,7 +412,7 @@ public class InstanceConfig extends HelixProperty {
       currentDisabled = new HashMap<>();
     }
 
-    if (disabledPartitionList != null) {
+    if (disabledPartitionList != null && !disabledPartitionList.isEmpty()) {
       currentDisabled.put(resourceName, HelixUtil.serializeByComma(disabledPartitionList));
     } else {
       currentDisabled.remove(resourceName);