[jboss-jira] [JBoss JIRA] (DROOLS-2426) ParallelEvaluationTest.testFireUntilHaltWithExpiration2 fails with lower amount of processors

Tibor Zimányi (JIRA) issues at jboss.org
Tue Apr 3 09:54:01 EDT 2018


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

Tibor Zimányi edited comment on DROOLS-2426 at 4/3/18 9:53 AM:
---------------------------------------------------------------

Ok nevermind, I'm blind, there is an inherited partitioned agenda with partitionId. So don't mind my previous comment. 

However I think I found the problem (really this time:) ). The problem is that the master agenda expires fact handle before other agendas gets time to process propagations created based on this fact handle. When I comment this out [1], the test works. 

I think there might be some sort of callback mechanism for fact handle expiration, because there must be guaranteed that each partitioned agenda have time to process all propagations related to a fact handle (a sort of synchronization on fact handle expiration). 

[1] https://github.com/kiegroup/drools/blob/91cb991a4db283ac00eaa2e16d606d72209b13e4/drools-core/src/main/java/org/drools/core/impl/StatefulKnowledgeSessionImpl.java#L1828


was (Author: tzimanyi):
Ok nevermind, I'm blind, there is an inherited partitioned agenda with partitionId. So don't mind my previous comment. 

However I think I found the problem (really this time:) ). The problem is that the master agenda expires fact handle before other agendas gets time to process activations created based on this fact handle. When I comment this out [1], the test works. 

I think there might be some sort of callback mechanism for fact handle expiration, because there must be guaranteed that each partitioned agenda have time to process all propagations related to a fact handle (a sort of synchronization on fact handle expiration). 

[1] https://github.com/kiegroup/drools/blob/91cb991a4db283ac00eaa2e16d606d72209b13e4/drools-core/src/main/java/org/drools/core/impl/StatefulKnowledgeSessionImpl.java#L1828

> ParallelEvaluationTest.testFireUntilHaltWithExpiration2 fails with lower amount of processors
> ---------------------------------------------------------------------------------------------
>
>                 Key: DROOLS-2426
>                 URL: https://issues.jboss.org/browse/DROOLS-2426
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.7.0.Final
>            Reporter: Tibor Zimányi
>            Assignee: Mario Fusco
>
> The test ParallelEvaluationTest.testFireUntilHaltWithExpiration2 fails randomly, when the machine on which it is run has smaller amount of processors (tested with 2). It fails because the engine doesn't produce expected amount of rule fires, so the test waits on a CountDownLatch. One idea what happens is that one agenda thread expires events from second agenda on some race condition. But that is a first guess after looking at the code. 
> Steps to reproduce: 
> 1. Change the number of parallel partitions to 2 here [1]
> 2. Rebuild drools-core
> 3. Run the test from PR [2] few times. 
> [1] https://github.com/kiegroup/drools/blob/63ea870c89591dfeae1276f582d825670fe7ec3a/drools-core/src/main/java/org/drools/core/common/RuleBasePartitionId.java#L31
> [2] https://github.com/kiegroup/drools/pull/1843



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jboss-jira mailing list