Updated Branches: refs/heads/master 3e2829207 -> e19679c6d
Fixing spawining more than two instances when a member fault comes Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/e19679c6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/e19679c6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/e19679c6 Branch: refs/heads/master Commit: e19679c6d102640861e5b160b3d0eb9cbbb00e3f Parents: 3e28292 Author: Lahiru Sandaruwan <[email protected]> Authored: Mon Jan 20 00:55:47 2014 +0530 Committer: Lahiru Sandaruwan <[email protected]> Committed: Mon Jan 20 00:55:47 2014 +0530 ---------------------------------------------------------------------- .../message/receiver/health/AutoscalerHealthStatReceiver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/e19679c6/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java index 7843088..ac76899 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java @@ -750,11 +750,11 @@ public class AutoscalerHealthStatReceiver implements Runnable { ccClient.terminate(memberId); - partitionCtxt.removeActiveMemberById(memberId); - String lbClusterId = AutoscalerRuleEvaluator.getLbClusterId(partitionCtxt, nwPartitionCtxt.getId()); partitionCtxt.addPendingMember(ccClient.spawnAnInstance(partition, clusterId, lbClusterId, nwPartitionCtxt.getId())); + partitionCtxt.removeActiveMemberById(memberId); + if (log.isInfoEnabled()) { log.info(String.format("Instance spawned for fault member: [member] %s [partition] %s [cluster] %s [lb cluster] %s ", memberId, partitionId, clusterId, lbClusterId));
