You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by Thomas Draier <td...@jahia.com> on 2018/09/10 14:12:56 UTC

Issues with segments

Hi,

I've found 2 issues with segments :
https://issues.apache.org/jira/browse/UNOMI-197 and
https://issues.apache.org/jira/browse/UNOMI-198 . First one can be easily
fixed, I don't know if you see any reason why the enabled value was not
checked ? For the stack overflow issue, not sure what we should do .. the
fact that it's recursive is not good (would be better with a queue of
event) but won't change the infinite flow of events. Any idea  if we should
do something about it ?

Thomas

Re: Issues with segments

Posted by Serge Huber <sh...@apache.org>.
Yeah it seems like a bad idea. Do you have a list of the problematic actions ?



On Tue, Sep 11, 2018 at 11:28 AM Thomas Draier <td...@jahia.com> wrote:
>
> Hi,
>
> I did a simple fix checking the recursion depth. This work in my case
> (segments) and probably most of the cases, but some actions directly call
> the EventService.send method - which will reset the recursion count.
> Actually I have no idea why these actions are sending the "profileUpdated"
> event by themselves, since it's sent anyway by the EventService itself
> after the execution of all rules. Seems a bad idea to me ?
>
> Thomas
>
>
> On Mon, Sep 10, 2018 at 4:37 PM Serge Huber <sh...@apache.org> wrote:
>
> > Hello Thomas,
> >
> > Agreed the first one should be fixed.
> >
> > For the second one, I was thinking that maybe we should try to detect
> > the recursion and if so prevent it from happening. What do you think?
> > This would involve some kind of common contact and some kind of
> > tracing of which events are occurring so that we can detect this loop.
> >
> > cheers,
> >   Serge...
> > On Mon, Sep 10, 2018 at 4:13 PM Thomas Draier <td...@jahia.com> wrote:
> > >
> > > Hi,
> > >
> > > I've found 2 issues with segments :
> > > https://issues.apache.org/jira/browse/UNOMI-197 and
> > > https://issues.apache.org/jira/browse/UNOMI-198 . First one can be
> > easily
> > > fixed, I don't know if you see any reason why the enabled value was not
> > > checked ? For the stack overflow issue, not sure what we should do .. the
> > > fact that it's recursive is not good (would be better with a queue of
> > > event) but won't change the infinite flow of events. Any idea  if we
> > should
> > > do something about it ?
> > >
> > > Thomas
> >

Re: Issues with segments

Posted by Thomas Draier <td...@jahia.com>.
Hi,

I did a simple fix checking the recursion depth. This work in my case
(segments) and probably most of the cases, but some actions directly call
the EventService.send method - which will reset the recursion count.
Actually I have no idea why these actions are sending the "profileUpdated"
event by themselves, since it's sent anyway by the EventService itself
after the execution of all rules. Seems a bad idea to me ?

Thomas


On Mon, Sep 10, 2018 at 4:37 PM Serge Huber <sh...@apache.org> wrote:

> Hello Thomas,
>
> Agreed the first one should be fixed.
>
> For the second one, I was thinking that maybe we should try to detect
> the recursion and if so prevent it from happening. What do you think?
> This would involve some kind of common contact and some kind of
> tracing of which events are occurring so that we can detect this loop.
>
> cheers,
>   Serge...
> On Mon, Sep 10, 2018 at 4:13 PM Thomas Draier <td...@jahia.com> wrote:
> >
> > Hi,
> >
> > I've found 2 issues with segments :
> > https://issues.apache.org/jira/browse/UNOMI-197 and
> > https://issues.apache.org/jira/browse/UNOMI-198 . First one can be
> easily
> > fixed, I don't know if you see any reason why the enabled value was not
> > checked ? For the stack overflow issue, not sure what we should do .. the
> > fact that it's recursive is not good (would be better with a queue of
> > event) but won't change the infinite flow of events. Any idea  if we
> should
> > do something about it ?
> >
> > Thomas
>

Re: Issues with segments

Posted by Serge Huber <sh...@apache.org>.
Hello Thomas,

Agreed the first one should be fixed.

For the second one, I was thinking that maybe we should try to detect
the recursion and if so prevent it from happening. What do you think?
This would involve some kind of common contact and some kind of
tracing of which events are occurring so that we can detect this loop.

cheers,
  Serge...
On Mon, Sep 10, 2018 at 4:13 PM Thomas Draier <td...@jahia.com> wrote:
>
> Hi,
>
> I've found 2 issues with segments :
> https://issues.apache.org/jira/browse/UNOMI-197 and
> https://issues.apache.org/jira/browse/UNOMI-198 . First one can be easily
> fixed, I don't know if you see any reason why the enabled value was not
> checked ? For the stack overflow issue, not sure what we should do .. the
> fact that it's recursive is not good (would be better with a queue of
> event) but won't change the infinite flow of events. Any idea  if we should
> do something about it ?
>
> Thomas