stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isu...@apache.org
Subject [1/2] git commit: Fixing STRATOS-378
Date Mon, 03 Feb 2014 10:21:45 GMT
Updated Branches:
  refs/heads/master 9e1f7145a -> 32e63db3c


Fixing STRATOS-378


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

Branch: refs/heads/master
Commit: df7e6d8b1d5a44a61f052cadb33c14211a9c2d45
Parents: dac3417
Author: Melan Nimesh <melannj86@gmail.com>
Authored: Mon Jan 27 10:48:48 2014 +0530
Committer: Isuru <isuruh@wso2.com>
Committed: Mon Feb 3 15:50:13 2014 +0530

----------------------------------------------------------------------
 .../load/balancer/mediators/ResponseInterceptor.java      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/df7e6d8b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/mediators/ResponseInterceptor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/mediators/ResponseInterceptor.java
b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/mediators/ResponseInterceptor.java
index e350840..7ca6c8d 100644
--- a/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/mediators/ResponseInterceptor.java
+++ b/components/org.apache.stratos.load.balancer/src/main/java/org/apache/stratos/load/balancer/mediators/ResponseInterceptor.java
@@ -37,10 +37,14 @@ public class ResponseInterceptor extends AbstractMediator implements ManagedLife
                 log.debug("Response interceptor mediation started");
             }
             String clusterId = (String) messageContext.getProperty(Constants.CLUSTER_ID);
-            if (StringUtils.isBlank(clusterId)) {
-                throw new RuntimeException("Cluster id not found in message context");
+            if (StringUtils.isNotBlank(clusterId)) {
+            	LoadBalancerStatisticsCollector.getInstance().removeAnInFlightRequest(clusterId);
+            } else{
+            	if (log.isDebugEnabled()) {
+                    log.debug("Could not decrement in-flight request count : cluster id not
found in message context");
+                }
             }
-            LoadBalancerStatisticsCollector.getInstance().removeAnInFlightRequest(clusterId);
+            
         } catch (Exception e) {
             if(log.isErrorEnabled()) {
                 log.error("Could not decrement in-flight request count", e);


Mime
View raw message