Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-3228

Rules don't produce the correct result anymore after a session reset

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.14.0.Final
    • 7.13.0.Final
    • None
    • None
    • 2018 Week 42-44, 2018 Week 45-47
    • NEW
    • NEW

    Description

      Hello,

      A while ago I've created a test project to compare the different possibilities of session types and session polling/reusing. After an update to Drools 7.13.0.Final I found a performance improvement but also three issues. I would summarize all issues in this ticket, let me know if you have a different preference. I have also created a PR which helped me to continue with my tests: https://github.com/kiegroup/drools/pull/2135

      1. Incorrect results
      If you clone the project and execute StatefulDroolsEngineUnitTest.java then you will see test failures with 7.13.0.Final while the tests pass with 7.12.0.Final. I could trace the issue back to a recent change in ConcurrentNodeMemories. If I revert this change on a snapshot build of 7.14.0 then the tests pass again.

      2. Reset doesn't bring a disposed session back to life
      With 7.12.0.Final it was possible to bring a disposed session back to life by calling the reset method. In 7.13.0.Final that doesn't work anymore because the checkAlive validation then fails.
      The new session pools seem to deal with that by just setting the alive flag back to true if a session is reused. While the new session pools are great, we would like to stick with our existing and simpler session pooling which makes use of the reset method. So would it be possible to set the alive flag to true on a session reset?

      3. A stateless sequential session doesn't execute any rules after a reset

      https://github.com/liebharc/JavaRules/blob/master/src/test/java/com/github/liebharc/JavaRules/StatelessSequentialDroolsEngineUnitTest.java fails as a stateless sequential session skips all adds to its agenda group queue after the session has been reset.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            christianl_jira Christian Liebhardt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: