]
Kris Verlaenen updated DROOLS-3228:
-----------------------------------
Sprint: 2018 Week 42-44, 2018 Week 45-47 (was: 2018 Week 42-44)
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/b...]
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/githu...
fails as a stateless sequential session skips all adds to its agenda group queue after the
session has been reset.