You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Udara Liyanage <ud...@wso2.com> on 2014/12/10 11:00:55 UTC

Do we have to publish CompleteTenantEvent periodically

Hi,

TenantSynzhronizerTask periodically publishes CompleteTenantEvent event.
This results in issues when oAuth feature is added since there are tenant
listeners.
For instance  TenantManagementListener fails with database constraint
violation.

-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Do we have to publish CompleteTenantEvent periodically

Posted by Imesh Gunaratne <im...@apache.org>.
As I can see this logic has been added in following commit:
https://github.com/apache/stratos/commit/9f0c67e72b8ddc460851a11204d011b8c8123ddf#diff-a2dfddfdaa380d6ab46c92cd87d1ee21

We might need to check the reason for this fix.

Thanks

On Thu, Dec 11, 2014 at 9:30 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Chamila,
>
> AFAIU LB is needed this event in order to do tenant aware load balancing.
> However my concern is why Carbon addTenant() is triggered here.
>
> On Thu, Dec 11, 2014 at 8:04 AM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>>  Hi Udara,
>>
>> The usual case for processing CompleteTenantEvent is to use it at first
>> to establish the Topology model and then ignore the consequent ones. The
>> components will update the model based on the other topology events. So as
>> far as I understood, you should have a flag to determine if
>> CompleteTenantEvent was already processed or not.
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Wed, Dec 10, 2014 at 3:43 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Yes it is the culprit. It periodically trigger the add Tenant.
>>>
>>> TenantMgtUtil.triggerAddTenant(tenantBean);
>>>
>>> On Wed, Dec 10, 2014 at 3:38 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Just noticed TenantCompletion event is an Stratos event. So this may
>>>> not be the culprit for the constraint issue.
>>>>
>>>> On Wed, Dec 10, 2014 at 3:30 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> TenantSynzhronizerTask periodically publishes CompleteTenantEvent
>>>>> event. This results in issues when oAuth feature is added since there are
>>>>> tenant listeners.
>>>>> For instance  TenantManagementListener fails with database constraint
>>>>> violation.
>>>>>
>>>>> --
>>>>>
>>>>> Udara Liyanage
>>>>> Software Engineer
>>>>> WSO2, Inc.: http://wso2.com
>>>>> lean. enterprise. middleware
>>>>>
>>>>> web: http://udaraliyanage.wordpress.com
>>>>> phone: +94 71 443 6897
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Do we have to publish CompleteTenantEvent periodically

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Chamila,

AFAIU LB is needed this event in order to do tenant aware load balancing.
However my concern is why Carbon addTenant() is triggered here.

On Thu, Dec 11, 2014 at 8:04 AM, Chamila De Alwis <ch...@wso2.com> wrote:

>  Hi Udara,
>
> The usual case for processing CompleteTenantEvent is to use it at first to
> establish the Topology model and then ignore the consequent ones. The
> components will update the model based on the other topology events. So as
> far as I understood, you should have a flag to determine if
> CompleteTenantEvent was already processed or not.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Wed, Dec 10, 2014 at 3:43 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> Yes it is the culprit. It periodically trigger the add Tenant.
>>
>> TenantMgtUtil.triggerAddTenant(tenantBean);
>>
>> On Wed, Dec 10, 2014 at 3:38 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Just noticed TenantCompletion event is an Stratos event. So this may not
>>> be the culprit for the constraint issue.
>>>
>>> On Wed, Dec 10, 2014 at 3:30 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> TenantSynzhronizerTask periodically publishes CompleteTenantEvent
>>>> event. This results in issues when oAuth feature is added since there are
>>>> tenant listeners.
>>>> For instance  TenantManagementListener fails with database constraint
>>>> violation.
>>>>
>>>> --
>>>>
>>>> Udara Liyanage
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> lean. enterprise. middleware
>>>>
>>>> web: http://udaraliyanage.wordpress.com
>>>> phone: +94 71 443 6897
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Do we have to publish CompleteTenantEvent periodically

Posted by Chamila De Alwis <ch...@wso2.com>.
 Hi Udara,

The usual case for processing CompleteTenantEvent is to use it at first to
establish the Topology model and then ignore the consequent ones. The
components will update the model based on the other topology events. So as
far as I understood, you should have a flag to determine if
CompleteTenantEvent was already processed or not.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Wed, Dec 10, 2014 at 3:43 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> Yes it is the culprit. It periodically trigger the add Tenant.
>
> TenantMgtUtil.triggerAddTenant(tenantBean);
>
> On Wed, Dec 10, 2014 at 3:38 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> Just noticed TenantCompletion event is an Stratos event. So this may not
>> be the culprit for the constraint issue.
>>
>> On Wed, Dec 10, 2014 at 3:30 PM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> TenantSynzhronizerTask periodically publishes CompleteTenantEvent event.
>>> This results in issues when oAuth feature is added since there are tenant
>>> listeners.
>>> For instance  TenantManagementListener fails with database constraint
>>> violation.
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>

Re: Do we have to publish CompleteTenantEvent periodically

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

Yes it is the culprit. It periodically trigger the add Tenant.

TenantMgtUtil.triggerAddTenant(tenantBean);

On Wed, Dec 10, 2014 at 3:38 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> Just noticed TenantCompletion event is an Stratos event. So this may not
> be the culprit for the constraint issue.
>
> On Wed, Dec 10, 2014 at 3:30 PM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> TenantSynzhronizerTask periodically publishes CompleteTenantEvent event.
>> This results in issues when oAuth feature is added since there are tenant
>> listeners.
>> For instance  TenantManagementListener fails with database constraint
>> violation.
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Do we have to publish CompleteTenantEvent periodically

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

Just noticed TenantCompletion event is an Stratos event. So this may not be
the culprit for the constraint issue.

On Wed, Dec 10, 2014 at 3:30 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> TenantSynzhronizerTask periodically publishes CompleteTenantEvent event.
> This results in issues when oAuth feature is added since there are tenant
> listeners.
> For instance  TenantManagementListener fails with database constraint
> violation.
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897