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

Tom Baeyens (JIRA) jira-events at lists.jboss.org
Wed Sep 5 04:28:26 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBPM-983?page=comments#action_12375308 ] 
            
Tom Baeyens commented on JBPM-983:
----------------------------------

Here are my initial comments on reading Ed's comments.  I'll now try to run the attached test case and see what that learns me.

"
The three problems I've nailed down are:
-- if a job is saved while other jobs are in process for the same Process Instance, the saved job may run immediately, ignoring the "exclusive" flag
"
[tom]: that should be added in the documentation as a limitation.  see my comment on your proposed fix later in this post

"
-- when a ProcessState is completed on a job that started in the subprocess, a collision can occur with another thread concurrently running in the parent process, resulting in a StaleObjectStateException
"
[tom]:  i don't really get this problem.  and then i don't see why the staleobjectexception is a problem.  that is to be expected when 2 independent threads operation on the same process instance runtime information item, no ?

"
-- when a ProcessState launches a subprocess, and the subprocess immediately reaches a node with "async=exclusive", the node job may be picked up and started before the ProcessInstance object has been committed to the database. This has been noted before on the forum, but I can't find a JIRA item regarding it.
"
[tom]: isn't this due to your isolation level 0 ?

"
To fix these problems, we need a way to synchronize across threads and servers on ProcessInstances and Tokens .
You may want to factor out a "Concurrency Service" ...
"
[tom]: that is exactly what we don't want to do.  we should only offer what we can do by synchronizing on the DB.  that should give us enough features to work with.  the downside is that some features may depend on isolation levels.  that should be documented better imo.

> 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