[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1432) Queries Executed while Rules are Firing Causes Exceptions

Mark Proctor (JIRA) jira-events at lists.jboss.org
Tue Mar 11 23:05:58 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBRULES-1432?page=all ]

Mark Proctor updated JBRULES-1432:
----------------------------------

    Fix Version/s: 5.0.0-M1
         Assignee: Mark Proctor

querries are not thread safe. I don't think we'll fix this for 4.0.x, I'll mark it as 5.0.

> Queries Executed while Rules are Firing Causes Exceptions
> ---------------------------------------------------------
>
>                 Key: JBRULES-1432
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1432
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Reteoo
>    Affects Versions: 4.0.4
>         Environment: Sun 1.5.0_04 Windows
>            Reporter: Steve Shabino
>         Assigned To: Mark Proctor
>             Fix For: 5.0.0-M1
>
>
> We have a stateful WM into which we periodically (1) insert new facts and fire rules, and (2) execute queries.  Drools fails when we allow query execution in another thread during fireAllRules().
> Set-up: 
> - Every 10 seconds, Thread A inserts some facts and calls fireAllRules().  fireAllRules() is never called concurrently with itself.
> - Thread B executes many getQueryResults() calls in series (no concurrency in query execution)
> Our rule base uses shadow facts for all facts and is set up this way:
> 			conf.setAssertBehaviour(RuleBaseConfiguration.AssertBehaviour.EQUALITY);
> 			conf.setRemoveIdentities(true);
> 			conf.setLogicalOverride(RuleBaseConfiguration.LogicalOverride.DISCARD);
> 			conf.setMaintainTms(true);
> 			conf.setShadowProxy(true);
> We are making some use of insertLogical().
> Expected:
> - Queries are run against the last consistent truth state, even while fireAllRules() is running.
> Actual Behavior:
> We get this exception:
>         Caused by: java.lang.RuntimeException: Unable to pop
> 	at org.drools.util.PrimitiveLongStack.pop(PrimitiveLongStack.java:63)
> 	at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:44)
> 	at org.drools.reteoo.ReteooWorkingMemory.getQueryResults(ReteooWorkingMemory.java:90)
> This bug occurs under 4.04 and 4.1 Trunk as of 1/22.
> Please let us know if we can provide additional information. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list