Hi
When we do A/B test after migrating drools from 5.1.1 to 6.2.0 final we found an issue of activation group.
Issue description
Same rule flow group and activation group but different salience rules, expected behavior is high salience rule is fired and other rules are canceled. But in some cases two rules with same activation group both get fired.
Context
Our final goal is to get better performance time when call drools engine. As we know condition eval takes some time(one or two hundred ms level) when first time call drools engine. After first call you can get 1-5 ms processing time. So we designed a session pool to effectively reuse session and delete all objects in working memory after each calling. This solution works fine in 5.1.1 but sometimes issue happens in 6.2.0 final.
I searched below link and looks like it is a common request. But seems there is a bug in that post. Is there a drools team recommended way to get our final goal?
Approach to reuse KieSession
https://groups.google.com/forum/#!topic/drools-usage/-6iGRyrCr8M
I also did some investigation about this issue. Looks like when deleting one specific object from working memory(perhaps in cleaning cached nodes?) it messed up something.
DefaultAgenda.addEagerRuleAgendaItem
In line 280 item.isInList() is true and returned. This makes this RuleAgendaItem not add to eager so it finally makes this rule not canceled.
Another thing I don't understand is this issue can't be reproduced even with same rule in another sample project. So I sent kjar to Mark and related guys in gmail.
I also attached sample project code to reproduce this issue.
run IssueReproduceMain
Let me know if you need any thing else.
Thanks