[jboss-jira] [JBoss JIRA] Commented: (JBPM-983) concurrent process execution fails

Edward Staub (JIRA) jira-events at lists.jboss.org
Thu Sep 6 15:25:13 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBPM-983?page=comments#action_12375766 ] 
            
Edward Staub commented on JBPM-983:
-----------------------------------

>> No. Jobs are inserted in the same transaction as the process updates.

Good!  I was hoping I might be wrong about that.

>> this is also due to the isolation level 0. but even in most of those cases you just get an SOSException and there is no problem. in that case, the tx rolls back, which means that the message was not consumed and it will be processed again. as long as the database executes the updates atomically, there is no problem.

For us - we'll be using Oracle, so I'm fine - I couldn't use level 0 in production even if I wanted to!  I'm not nearly so optimistic about SOSExceptions with level 0, but real stakeholders should speak about that - not me.

So it seems like the bottom line on all these issues is that as a general rule of thumb, if anyone's using two or three of these three features:

  - forks, 
  - subprocesses, 
  - asynchronous nodes (using async attribute, or tasks, or anything else that completes asynchronously)

... then they probably need to use READ_COMMITTED or better isolation to avoid race conditions bugs. 

Does that sound about right?  [I'm just trying to help with the documentation wordsmithing.]  It's not totally correct, but it is easy to read, understand, and "test" a process definition against.


> concurrent process execution fails
> ----------------------------------
>
>                 Key: JBPM-983
>                 URL: http://jira.jboss.com/jira/browse/JBPM-983
>             Project: JBoss jBPM
>          Issue Type: Bug
>          Components: Core Engine
>    Affects Versions: jBPM jPDL 3.2
>         Environment: Hypersonic in-memory database, JobExecutor configured with 5 threads
>            Reporter: Alexander Schlett
>         Assigned To: Tom Baeyens
>            Priority: Critical
>             Fix For: jBPM jPDL 3.2.2
>
>         Attachments: SimpleTest.java, SimpleTest.java, SimpleTest.java, SimpleTest.java, SimpleTest.java
>
>
> concurrent execution of async nodes with multiple JobExecutor threads fails. the effect is:
> 1) job sync within JobExecutor fails due to org.hibernate.StaleObjectStateException
> 2) process gets stuck in join node and never ends
> junit test for this is attached, it's a simple process with just a fork and a join and some scripts inbetween.

-- 
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