helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [3/3] helix git commit: Let allowed down instance number can be 0
Date Wed, 21 Mar 2018 23:29:04 GMT
Let allowed down instance number can be 0

Current the number of down instance could be 0. It will be ignored if it set to be 0. But
0 is a valid case for not allowing any instances down.


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

Branch: refs/heads/master
Commit: e1176fe406e3a585b7d5860bf55862fc13df1b82
Parents: debb9bb
Author: Junkai Xue <jxue@linkedin.com>
Authored: Wed Feb 14 17:30:37 2018 -0800
Committer: Junkai Xue <jxue@linkedin.com>
Committed: Tue Mar 20 11:55:40 2018 -0700

----------------------------------------------------------------------
 .../apache/helix/controller/stages/BestPossibleStateCalcStage.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/e1176fe4/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
b/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
index a49c11b..1dad4f0 100644
--- a/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
+++ b/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
@@ -163,7 +163,7 @@ public class BestPossibleStateCalcStage extends AbstractBaseStage {
   private void validateOfflineInstancesLimit(final ClusterDataCache cache,
       final HelixManager manager, final ClusterStatusMonitor clusterStatusMonitor) {
     int maxOfflineInstancesAllowed = cache.getClusterConfig().getMaxOfflineInstancesAllowed();
-    if (maxOfflineInstancesAllowed > 0) {
+    if (maxOfflineInstancesAllowed >= 0) {
       int offlineCount = cache.getAllInstances().size() - cache.getEnabledLiveInstances().size();
       if (offlineCount > maxOfflineInstancesAllowed) {
         String errMsg = String.format(


Mime
View raw message