Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3075

window:length windows retaining events when they shouldnt

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Hide

      download attached maven project.
      mvn clean install
      build should fail due to a failing test

      Show
      download attached maven project. mvn clean install build should fail due to a failing test
    • Hide

      dont use window:length, ever?

      Show
      dont use window:length, ever?

    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 when it should only keep the last 3.

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

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            hatchetman82 Radai Rosenblatt (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty