[jboss-jira] [JBoss JIRA] Updated: (JBRULES-3075) window:length windows retaining events when they shouldnt

Radai Rosenblatt (JIRA) jira-events at lists.jboss.org
Thu Jun 9 09:38:59 EDT 2011


     [ https://issues.jboss.org/browse/JBRULES-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radai Rosenblatt updated JBRULES-3075:
--------------------------------------

    Description: 
using the following DRL:

package contrived.example

import contrived.example.EventWithTimestamp

declare EventWithTimestamp
    @role(event)
	@duration( duration )
    @timestamp( timestamp )
end

rule "no event in window"
when
    not EventWithTimestamp (someProp=="whatever") over window:length(3) from entry-point "Event Stream"
then
    System.err.println("retract");
end

if we start with an initial matching (someProp=="whatever") event and fire a long sequence of non-matching events:
{"something else", "something else" ... "something else"}
the rule should fire sometime into the long chain of "something else" events (it should fire after the 3rd such event - when the window contains 3 non-matching events and the 1st matching event has been pushed out).
in practice the rule never fires. worse, it also retains all the events in memory ehrn it should only keep the last 3.

to reproduce the issue, simply build the attached maven project (mvn clean install)

  was:
using the following DRL:

package contrived.example

import contrived.example.EventWithTimestamp

declare EventWithTimestamp
    @role(event)
	@duration( duration )
    @timestamp( timestamp )
end

rule "no event in window"
when
    not EventWithTimestamp (someProp=="whatever") over window:length(3) from entry-point "Event Stream"
then
    System.err.println("retract");
end

if we start with an initial matching (someProp=="whatever") event and a fire a long sequence of non-matching events:
{"something else", "something else" ... "something else"}
the rule should fire sometime into the long chain of "something else" events (it should fire after the 3rd such event).
in practice the rule never fires. worse, it also retains all the events in memory ehrn it should only keep the last 3.

to reproduce the issue, simply build the attached maven project (mvn clean install)



> window:length windows retaining events when they shouldnt
> ---------------------------------------------------------
>
>                 Key: JBRULES-3075
>                 URL: https://issues.jboss.org/browse/JBRULES-3075
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core (fusion)
>    Affects Versions: 5.2.0.CR1
>         Environment: win64, jdk 6u24
>            Reporter: Radai Rosenblatt
>            Assignee: Mark Proctor
>         Attachments: drools length window bug.zip
>
>
> using the following DRL:
> package contrived.example
> import contrived.example.EventWithTimestamp
> declare EventWithTimestamp
>     @role(event)
> 	@duration( duration )
>     @timestamp( timestamp )
> end
> rule "no event in window"
> when
>     not EventWithTimestamp (someProp=="whatever") over window:length(3) from entry-point "Event Stream"
> then
>     System.err.println("retract");
> end
> if we start with an initial matching (someProp=="whatever") event and fire a long sequence of non-matching events:
> {"something else", "something else" ... "something else"}
> the rule should fire sometime into the long chain of "something else" events (it should fire after the 3rd such event - when the window contains 3 non-matching events and the 1st matching event has been pushed out).
> in practice the rule never fires. worse, it also retains all the events in memory ehrn it should only keep the last 3.
> to reproduce the issue, simply build the attached maven project (mvn clean install)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list