Hi Imesh,

On Sun, Feb 1, 2015 at 9:08 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Isuru,
>
> Let me re-clarify the above point again, IMO when a block of code is
> trying to acquire a lock, the lock acquiring process should not fail due to
> any reason. The best way to do this is to create lock objects on demand.
> Lock object removal process works as it was before, when removing services
> and clusters from the topology.
>
If a lock has been previously removed and then a same lock is getting is
being accessed again, IMO its a bug in the code. If we create locks on
demand, we this issue will get ignored. IMHO we can create the lock in the
constructor itself as it was done previously. Then we are sure that the
lock is there, unless it has been removed due to a problem in the logic,
which we should fix. This was the thinking previously.

>
> I have now fixed this issue as described above with following commit
> revision:
> 35269223d9bc93279b6a5ebec124aa57695152e3
>

> Thanks
>
> On Sun, Feb 1, 2015 at 8:58 AM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Hi Isuru,
>>
>> With the latest codebase we can see how it has affected, now due to some
>> reason lock objects are not getting created. As a result the lock acquire
>> calls fail.
>>
>> IMO we need to create lock objects on demand and remove them when
>> relevant topology objects get removed from the system.
>>
>> Thanks
>>
>> On Sun, Feb 1, 2015 at 8:20 AM, Isuru Haththotuwa <isu...@apache.org>
>> wrote:
>>
>>> Hi Imesh,
>>>
>>> On Sun, Feb 1, 2015 at 12:06 AM, Imesh Gunaratne <im...@apache.org>
>>> wrote:
>>>
>>>> Hi Devs,
>>>>
>>>> I see an issue with topology hierarchy locking behaviour. The problem
>>>> is that topology lock objects are created at the time services and clusters
>>>> are created. IMO this is error prone, now with the latest codebase I can
>>>> see error logs saying "topology lock not found". Ideally locks should
>>>> always be created on demand.
>>>>
>>>  Can you explain a bit more about how this behavior is error prone? The
>>> logic was that each time a cluster/service/app is added/removed, we should
>>> be creating/removing the relevant lock(s). If that is not correctly
>>> happening we need to check where that is not happening and fix it.
>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PMC Member, Apache Stratos
>>>>
>>>> --
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>> * <http://wso2.com/>*
>>>>
>>>>
>>>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Reply via email to