Hi all,

When went through the code, we are calling terminateAllInstances(terminate
instance one by one and publish MemberTerminatedEvent) and
unRegisterSerivce(Removing the subscription data from CC and publish
ClusterRemovedEvent) from SM.

So, the flow should be synchronous here for terminateAllInstances and
unRegisterSerivce. But it is not, since we use thread pool in the
terminateAllInstances to terminate an instance.  unregisterService gets
called which remove the subscription, remove the cluster from Topology and
send the clusterRemovedEvent while the instances are being terminated. So,
the instance which is getting terminated, can't find the MemberConext or
Cluster from Topology due to those information already removed. So that we
faced the NPE.

In order to fix this, we have to make the call synchronous between
terminateAllInstances and unRegisterSerivce. Please suggest, whether it is
good approach to make the calls synchronous? or is there any other way to
overcome this issue?

Thanks,
Reka


On Fri, Jan 10, 2014 at 9:26 AM, Manula Chathurika Thantriwatte <
[email protected]> wrote:

> Sure will do it.
>
>
> On Fri, Jan 10, 2014 at 8:44 AM, Nirmal Fernando 
> <[email protected]>wrote:
>
>> Manula,
>>
>> Can you please debug and provide a fix for this issue? Probably some
>> not-null field is null in the received event. Please also handle the
>> possible NPEs you will come across.
>>
>> Thanks.
>>
>>
>> On Fri, Jan 10, 2014 at 8:14 AM, Udara Liyanage <[email protected]> wrote:
>>
>>> Me too encountered the same continuously.
>>>
>>> Touched, not typed. Erroneous words are a feature, not a typo.
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : [email protected] / [email protected]
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


-- 
Reka Thirunavukkarasu
Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Reply via email to