You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Asanka Sanjaya Herath <an...@gmail.com> on 2015/06/25 21:28:29 UTC

Topology does not contain information about latest activated member

Hi All,

As we discussed in the hangout I did some debugging on $subject.

*Issue: When configure() method[1] executed, topology object does not
contain information about latest activated member*.

When a member get activated [2], reloadConfiguration() method in
LoadBalancerExtension [3] class will be executed. But, at that time
topology object does not contain the information about the activated member.

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]​
.

​I think, If we can swap the execution of above two lines the problem may
be solved.
​But I'm not sure how to do it
.
​Any help is appreciated.

​[1]
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/LoadBalancer.java#L51

[2].
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#L194
​

​[3].
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#L197


[4].
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#L196

[5].
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L118

[6].
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L136
-- 
Thanks,
Regards,
ASH

Re: Topology does not contain information about latest activated member

Posted by Asanka Sanjaya Herath <an...@gmail.com>.
>
> ​
> We are not creating the new listener objects in LoadBalancerExtension
> class for every event.


​Yes I understand. Thanks Imesh and Gayan for looking into this.​


On Fri, Jul 3, 2015 at 11:23 AM, Gayan Gunarathne <ga...@wso2.com> wrote:

>
>
> 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.sh@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.sh@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 : gayang@wso2.com  | mobile : +94 766819985
>
>
>



-- 
Thanks,
Regards,
ASH

Re: Topology does not contain information about latest activated member

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Gayan,

On Fri, Jul 3, 2015 at 11:23 AM, Gayan Gunarathne <ga...@wso2.com> wrote:
>
>
> 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.
>
>>
>>
No, the event listener added for updating the topology provider triggers
first. This was intentionally done to avoid this problem.

-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Topology does not contain information about latest activated member

Posted by Gayan Gunarathne <ga...@wso2.com>.
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.sh@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 <an...@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 : gayang@wso2.com  | mobile : +94 766819985

Re: Topology does not contain information about latest activated member

Posted by Imesh Gunaratne <im...@apache.org>.
On Fri, Jun 26, 2015 at 12:58 AM, Asanka Sanjaya Herath <an...@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 <an...@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


>
>
-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Topology does not contain information about latest activated member

Posted by Asanka Sanjaya Herath <an...@gmail.com>.
Yes, That should be the way. Currently we are creating new listener objects
in LoadBalancerExtension class for every event.

On Thu, Jul 2, 2015 at 9:39 PM, Gayan Gunarathne <ga...@wso2.com> wrote:

> Hi Asanka,
>
> As we are updating and reading the TopologyProvider with two different
> listeners, we can't guaranteed topology provider update occurs before we
> reading the topology provider.IMO we can do it through one listener.
>
> Thanks,
> Gayan
>
> On Thu, Jul 2, 2015 at 8:23 PM, Asanka Sanjaya Herath <an...@gmail.com>
> wrote:
>
>> Hi,
>>
>> As Gayan suggested I added a delay before execute configure method as a
>> temporary solution. But It seems like the issue has not solved completely
>> yet.
>>
>> On Thu, Jul 2, 2015 at 6:46 PM, Asanka Sanjaya Herath <angal.sh@gmail.com
>> > wrote:
>>
>>> Hi Gayan,
>>>
>>> Yes that is correct. All the other members are shown in topology but the
>>> recent activated one is not showing. It seems like the issue is related to
>>> member activated event.
>>>
>>> On Thu, Jul 2, 2015 at 3:24 PM, Gayan Gunarathne <ga...@wso2.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Fri, Jun 26, 2015 at 12:58 AM, Asanka Sanjaya Herath <
>>>> angal.sh@gmail.com> wrote:
>>>>
>>>>>
>>>>> Hi All,
>>>>>
>>>>> As we discussed in the hangout I did some debugging on $subject.
>>>>>
>>>>> *Issue: When configure() method[1] executed, topology object does not
>>>>> contain information about latest activated member*.
>>>>>
>>>>> When a member get activated [2], reloadConfiguration() method in
>>>>> LoadBalancerExtension [3] class will be executed. But, at that time
>>>>> topology object does not contain the information about the activated member.
>>>>>
>>>>> 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]​
>>>>> .
>>>>>
>>>>
>>>> You mean that TopologyProvider is not updated with the new member
>>>> details when you are configuring the load balancer with the Topology
>>>> Provider?
>>>>
>>>>
>>>>>
>>>>> ​I think, If we can swap the execution of above two lines the problem
>>>>> may be solved.
>>>>> ​But I'm not sure how to do it
>>>>> .
>>>>> ​Any help is appreciated.
>>>>>
>>>>> ​[1]
>>>>> 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/LoadBalancer.java#L51
>>>>>
>>>>> [2].
>>>>> 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#L194
>>>>> ​
>>>>>
>>>>> ​[3].
>>>>> 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#L197
>>>>>
>>>>>
>>>>> [4].
>>>>> 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#L196
>>>>>
>>>>> [5].
>>>>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L118
>>>>>
>>>>> [6].
>>>>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L136
>>>>> --
>>>>> Thanks,
>>>>> Regards,
>>>>> ASH
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Gayan Gunarathne
>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>> Committer & PMC Member, Apache Stratos
>>>> email : gayang@wso2.com  | mobile : +94 766819985
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Thanks,
>>> Regards,
>>> ASH
>>>
>>
>>
>>
>> --
>> Thanks,
>> Regards,
>> ASH
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>



-- 
Thanks,
Regards,
ASH

Re: Topology does not contain information about latest activated member

Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi Asanka,

As we are updating and reading the TopologyProvider with two different
listeners, we can't guaranteed topology provider update occurs before we
reading the topology provider.IMO we can do it through one listener.

Thanks,
Gayan

On Thu, Jul 2, 2015 at 8:23 PM, Asanka Sanjaya Herath <an...@gmail.com>
wrote:

> Hi,
>
> As Gayan suggested I added a delay before execute configure method as a
> temporary solution. But It seems like the issue has not solved completely
> yet.
>
> On Thu, Jul 2, 2015 at 6:46 PM, Asanka Sanjaya Herath <an...@gmail.com>
> wrote:
>
>> Hi Gayan,
>>
>> Yes that is correct. All the other members are shown in topology but the
>> recent activated one is not showing. It seems like the issue is related to
>> member activated event.
>>
>> On Thu, Jul 2, 2015 at 3:24 PM, Gayan Gunarathne <ga...@wso2.com> wrote:
>>
>>>
>>>
>>> On Fri, Jun 26, 2015 at 12:58 AM, Asanka Sanjaya Herath <
>>> angal.sh@gmail.com> wrote:
>>>
>>>>
>>>> Hi All,
>>>>
>>>> As we discussed in the hangout I did some debugging on $subject.
>>>>
>>>> *Issue: When configure() method[1] executed, topology object does not
>>>> contain information about latest activated member*.
>>>>
>>>> When a member get activated [2], reloadConfiguration() method in
>>>> LoadBalancerExtension [3] class will be executed. But, at that time
>>>> topology object does not contain the information about the activated member.
>>>>
>>>> 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]​
>>>> .
>>>>
>>>
>>> You mean that TopologyProvider is not updated with the new member
>>> details when you are configuring the load balancer with the Topology
>>> Provider?
>>>
>>>
>>>>
>>>> ​I think, If we can swap the execution of above two lines the problem
>>>> may be solved.
>>>> ​But I'm not sure how to do it
>>>> .
>>>> ​Any help is appreciated.
>>>>
>>>> ​[1]
>>>> 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/LoadBalancer.java#L51
>>>>
>>>> [2].
>>>> 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#L194
>>>> ​
>>>>
>>>> ​[3].
>>>> 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#L197
>>>>
>>>>
>>>> [4].
>>>> 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#L196
>>>>
>>>> [5].
>>>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L118
>>>>
>>>> [6].
>>>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L136
>>>> --
>>>> Thanks,
>>>> Regards,
>>>> ASH
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Gayan Gunarathne
>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>> Committer & PMC Member, Apache Stratos
>>> email : gayang@wso2.com  | mobile : +94 766819985
>>>
>>>
>>>
>>
>>
>>
>> --
>> Thanks,
>> Regards,
>> ASH
>>
>
>
>
> --
> Thanks,
> Regards,
> ASH
>



-- 

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

Re: Topology does not contain information about latest activated member

Posted by Asanka Sanjaya Herath <an...@gmail.com>.
Hi,

As Gayan suggested I added a delay before execute configure method as a
temporary solution. But It seems like the issue has not solved completely
yet.

On Thu, Jul 2, 2015 at 6:46 PM, Asanka Sanjaya Herath <an...@gmail.com>
wrote:

> Hi Gayan,
>
> Yes that is correct. All the other members are shown in topology but the
> recent activated one is not showing. It seems like the issue is related to
> member activated event.
>
> On Thu, Jul 2, 2015 at 3:24 PM, Gayan Gunarathne <ga...@wso2.com> wrote:
>
>>
>>
>> On Fri, Jun 26, 2015 at 12:58 AM, Asanka Sanjaya Herath <
>> angal.sh@gmail.com> wrote:
>>
>>>
>>> Hi All,
>>>
>>> As we discussed in the hangout I did some debugging on $subject.
>>>
>>> *Issue: When configure() method[1] executed, topology object does not
>>> contain information about latest activated member*.
>>>
>>> When a member get activated [2], reloadConfiguration() method in
>>> LoadBalancerExtension [3] class will be executed. But, at that time
>>> topology object does not contain the information about the activated member.
>>>
>>> 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]​
>>> .
>>>
>>
>> You mean that TopologyProvider is not updated with the new member details
>> when you are configuring the load balancer with the Topology Provider?
>>
>>
>>>
>>> ​I think, If we can swap the execution of above two lines the problem
>>> may be solved.
>>> ​But I'm not sure how to do it
>>> .
>>> ​Any help is appreciated.
>>>
>>> ​[1]
>>> 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/LoadBalancer.java#L51
>>>
>>> [2].
>>> 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#L194
>>> ​
>>>
>>> ​[3].
>>> 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#L197
>>>
>>>
>>> [4].
>>> 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#L196
>>>
>>> [5].
>>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L118
>>>
>>> [6].
>>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L136
>>> --
>>> Thanks,
>>> Regards,
>>> ASH
>>>
>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead, WSO2 Inc. (http://wso2.com)
>> Committer & PMC Member, Apache Stratos
>> email : gayang@wso2.com  | mobile : +94 766819985
>>
>>
>>
>
>
>
> --
> Thanks,
> Regards,
> ASH
>



-- 
Thanks,
Regards,
ASH

Re: Topology does not contain information about latest activated member

Posted by Asanka Sanjaya Herath <an...@gmail.com>.
Hi Gayan,

Yes that is correct. All the other members are shown in topology but the
recent activated one is not showing. It seems like the issue is related to
member activated event.

On Thu, Jul 2, 2015 at 3:24 PM, Gayan Gunarathne <ga...@wso2.com> wrote:

>
>
> On Fri, Jun 26, 2015 at 12:58 AM, Asanka Sanjaya Herath <
> angal.sh@gmail.com> wrote:
>
>>
>> Hi All,
>>
>> As we discussed in the hangout I did some debugging on $subject.
>>
>> *Issue: When configure() method[1] executed, topology object does not
>> contain information about latest activated member*.
>>
>> When a member get activated [2], reloadConfiguration() method in
>> LoadBalancerExtension [3] class will be executed. But, at that time
>> topology object does not contain the information about the activated member.
>>
>> 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]​
>> .
>>
>
> You mean that TopologyProvider is not updated with the new member details
> when you are configuring the load balancer with the Topology Provider?
>
>
>>
>> ​I think, If we can swap the execution of above two lines the problem may
>> be solved.
>> ​But I'm not sure how to do it
>> .
>> ​Any help is appreciated.
>>
>> ​[1]
>> 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/LoadBalancer.java#L51
>>
>> [2].
>> 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#L194
>> ​
>>
>> ​[3].
>> 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#L197
>>
>>
>> [4].
>> 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#L196
>>
>> [5].
>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L118
>>
>> [6].
>> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L136
>> --
>> Thanks,
>> Regards,
>> ASH
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>



-- 
Thanks,
Regards,
ASH

Re: Topology does not contain information about latest activated member

Posted by Gayan Gunarathne <ga...@wso2.com>.
On Fri, Jun 26, 2015 at 12:58 AM, Asanka Sanjaya Herath <an...@gmail.com>
wrote:

>
> Hi All,
>
> As we discussed in the hangout I did some debugging on $subject.
>
> *Issue: When configure() method[1] executed, topology object does not
> contain information about latest activated member*.
>
> When a member get activated [2], reloadConfiguration() method in
> LoadBalancerExtension [3] class will be executed. But, at that time
> topology object does not contain the information about the activated member.
>
> 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]​
> .
>

You mean that TopologyProvider is not updated with the new member details
when you are configuring the load balancer with the Topology Provider?


>
> ​I think, If we can swap the execution of above two lines the problem may
> be solved.
> ​But I'm not sure how to do it
> .
> ​Any help is appreciated.
>
> ​[1]
> 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/LoadBalancer.java#L51
>
> [2].
> 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#L194
> ​
>
> ​[3].
> 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#L197
>
>
> [4].
> 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#L196
>
> [5].
> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L118
>
> [6].
> https://github.com/apache/stratos/blob/master/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/event/receivers/LoadBalancerCommonTopologyEventReceiver.java#L136
> --
> Thanks,
> Regards,
> ASH
>



-- 

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