On Fri, Jul 3, 2015 at 10:42 AM, Imesh Gunaratne <im...@apache.org> wrote:

> On Fri, Jun 26, 2015 at 12:58 AM, Asanka Sanjaya Herath <
> angal...@gmail.com> wrote:
>
>>
>> Once I debug the flow, I figured out that line 196 in
>> LoadBalancerExtension class
>> ​ ​
>> [4] get executed *before* line 118 in
>> LoadBalancerCommonTopologyEventReceive
>> ​r ciass​
>> ​ ​
>> [5]. Therefore addMember() method[6] will execute after
>> reloadConfiguration() method[3] executed. So member has not been added to
>> topology when configure() method get executed in
>> ​ LoadBalancer​
>> API
>> ​ [1]​
>> .
>>
>
> Ideally this should not happen, I will check this.
>
> On Thu, Jul 2, 2015 at 9:44 PM, Asanka Sanjaya Herath <angal...@gmail.com>
> wrote:
>
>> Yes, That should be the way. Currently we are creating new listener
>> objects in LoadBalancerExtension class for every event.
>>
>> No, AFAIK we are not doing this. Event listeners are only created once:
>
>
> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancerExtension.java#L86
>

We are not creating the new listener objects in LoadBalancerExtension class
for every event. Issue here is we are updating and reading the
TopologyProvider with two different listeners for member activate event. So
we can't guaranteed topology provider update occurs before we reading the
topology provider.

>
>
>
>>
>>
> --
> Imesh Gunaratne
>
> Senior Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 766819985

Reply via email to