You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/03/02 13:15:02 UTC

stratos git commit: Fix memory consumption based instance calculation logic to allow bursting scenario

Repository: stratos
Updated Branches:
  refs/heads/master 526095b50 -> 50d5a750e


Fix memory consumption based instance calculation logic to allow bursting scenario


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

Branch: refs/heads/master
Commit: 50d5a750eed5a8a0ed37e3922c7801e088c46a58
Parents: 526095b
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Mon Mar 2 17:44:52 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Mon Mar 2 17:44:52 2015 +0530

----------------------------------------------------------------------
 .../apache/stratos/autoscaler/rule/RuleTasksDelegator.java    | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/50d5a750/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
index 66568af..b9613e6 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
@@ -99,11 +99,8 @@ public class RuleTasksDelegator {
                 numberOfAdditionalInstancesRequired = (predictedValue - threshold) / gradient;
             }
         }
-        if(min + numberOfAdditionalInstancesRequired > max){
-            return max;
-        } else {
-            return (int) Math.ceil(min + numberOfAdditionalInstancesRequired);
-        }
+
+        return (int) Math.ceil(min + numberOfAdditionalInstancesRequired);
     }
 
     public int getNumberOfInstancesRequiredBasedOnLoadAverage(float threshold, double predictedValue,