[jboss-jira] [JBoss JIRA] (DROOLS-3228) Rules don't produce the correct result anymore after a session reset

Mario Fusco (Jira) issues at jboss.org
Mon Nov 5 08:31:00 EST 2018


    [ https://issues.jboss.org/browse/DROOLS-3228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13656569#comment-13656569 ] 

Mario Fusco commented on DROOLS-3228:
-------------------------------------

Poker: 3

> Rules don't produce the correct result anymore after a session reset
> --------------------------------------------------------------------
>
>                 Key: DROOLS-3228
>                 URL: https://issues.jboss.org/browse/DROOLS-3228
>             Project: Drools
>          Issue Type: Bug
>    Affects Versions: 7.13.0.Final
>            Reporter: Christian Liebhardt
>            Assignee: Mario Fusco
>            Priority: Major
>
> 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|https://github.com/liebharc/JavaRules/blob/master/src/test/java/com/github/liebharc/JavaRules/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.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list