Hi Asitha,

I don't think we can achieve this by only doing the cleanup at the
coordinator selection point. We have to clean the topic subscriptions for a
non-coordinator node when it leaves (In this case a new coordinator will
not be elected).

On Thu, Aug 13, 2015 at 5:04 AM, Asitha Nanayakkara <[email protected]> wrote:

>
>
> On Wed, Aug 12, 2015 at 10:53 PM, Asanka Abeyweera <[email protected]>
> wrote:
>
>> Hi Pumudu,
>>
>> I think we have to do the clean up in both places. Case 1 is required
>> when the only node in the cluster leaves and come back. Case 2 is required
>> when a single node leaves in a multi node cluster.
>>
>> On Wed, Aug 12, 2015 at 5:38 PM, Pumudu Ruhunage <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> Currently if MB node got killed unexpectedly non-durable topic
>>> subscriptions bind to that node will remain in cluster. This can cause
>>> unexpected behaviors in cluster since that node has already removed.
>>>
>>> IMO these topic subscriptions can clean up in two methods.
>>>
>>> 1. During each MB node start up, remove all non-durable topic
>>> subscriptions for it's local node id. (This will ensure newly started node
>>> won't receive any non-durable topic messages related to previously killed
>>> MB node with same node id)
>>>
>>
>> I think  we can do this in org.wso2.andes.kernel.AndesKernelBoot or in a
>> similar class. May be we can do this similar to the way we do the slot
>> recovery task.
>>
>>>
>>>
>> 2. Cluster coordinator should remove all non-durable topic subscriptions
>>> when a member left from cluster. (This can be a problem if coordinator node
>>> killed. If there's a method to get previous coordinator node id by newly
>>> elected coordinator this method can be implemented)
>>>
>>
>> For this case we can do the clean up in
>> org.wso2.andes.server.cluster.ClusterManager#memberRemoved method after
>> checking if the current node is the coordinator. This will work even if the
>> coordinator node get killed.
>>
>
> When a new coordinator is elected can't we let that newly elected
> coordinator do this ? Even at startup there is a coordinator election
> right? if that's the case we can cover both scenarios IMO?
>
>
>>>
>> How should we do the clean up. WDYT?
>>>
>>> Regards,
>>> Pumudu
>>> --
>>> Pumudu Ruhunage
>>> Associate Software Engineer | WSO2 Inc
>>> M: +94 779 664493  | http://wso2.com
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Asanka Abeyweera
>> Software Engineer
>> WSO2 Inc.
>>
>> Phone: +94 712228648
>> Blog: a5anka.github.io
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Asitha Nanayakkara*
> Software Engineer
> WSO2, Inc. http://wso2.com/
> Mob: + 94 77 85 30 682
>
>


-- 
Asanka Abeyweera
Software Engineer
WSO2 Inc.

Phone: +94 712228648
Blog: a5anka.github.io
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to