Re: [Dev] Debug statements in TenantAwareLoadBalanceEndpoint

2013-08-18 Thread Kishanthan Thangarajah
Nirmal, We should also check the dispatch component in synapse[1], specially AbstractDispatcher#removeSessionID, where it has debug level logs without the correct wrap. I think this was added for a recent ELB related fix. Thanks, Kishanthan. [1] https://svn.wso2.org/repos/wso2/carbon/platform/tru

Re: [Dev] Debug statements in TenantAwareLoadBalanceEndpoint

2013-08-17 Thread Nirmal Fernando
Hi Sameera, Please apply the attached patch to https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/load-balancer/lb-endpoint/org.wso2.carbon.lb.endpoint On Fri, Aug 16, 2013 at 9:39 PM, Lahiru Sandaruwan wrote: > Hi, > > > On Fri, Aug 16, 2013 at 8:31 PM, Nirmal Fernando wrote: >

Re: [Dev] Debug statements in TenantAwareLoadBalanceEndpoint

2013-08-16 Thread Lahiru Sandaruwan
Hi, On Fri, Aug 16, 2013 at 8:31 PM, Nirmal Fernando wrote: > Hi, > > > On Fri, Aug 16, 2013 at 7:43 PM, Sameera Jayasoma wrote: > >> I've also seen some place where we need to improve in >> the TenantAwareLoadBalanceEndpoint class. Here are my observations. >> >> 1) Five different inner "for-l

Re: [Dev] Debug statements in TenantAwareLoadBalanceEndpoint

2013-08-16 Thread Nirmal Fernando
Hi Azeez, I grepped the class: nirmal@nirmal:/media/wso2/carbon/platform/trunk/components/load-balancer/lb-endpoint/org.wso2.carbon.lb.endpoint$ grep -nr log.isDebug ./src/main/java/org/wso2/carbon/lb/endpoint/endpoint/TenantAwareLoadBalanceEndpoint.java 142:if (log.is

Re: [Dev] Debug statements in TenantAwareLoadBalanceEndpoint

2013-08-16 Thread Nirmal Fernando
Hi, On Fri, Aug 16, 2013 at 7:43 PM, Sameera Jayasoma wrote: > I've also seen some place where we need to improve in > the TenantAwareLoadBalanceEndpoint class. Here are my observations. > > 1) Five different inner "for-loops". This is a bad smell in the code. > This five different inner 'for-

Re: [Dev] Debug statements in TenantAwareLoadBalanceEndpoint

2013-08-16 Thread Sameera Jayasoma
I've also seen some place where we need to improve in the TenantAwareLoadBalanceEndpoint class. Here are my observations. 1) Five different inner "for-loops". This is a bad smell in the code. 2) We do a registry lookup for each and every unknown host name. This bit of code is vulnerable to a DOS A

[Dev] Debug statements in TenantAwareLoadBalanceEndpoint

2013-08-16 Thread Afkham Azeez
There are a number of debug statements which do String concatenations, and are not wrapped in log.isDebugEnabled() conditions. Such statements will cause unnecessary performance overhead. -- *Afkham Azeez* Director of Architecture; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; h