[JBoss JIRA] Commented: (JBPM-1072) Concurrent JobExecutors can process the same job in parallel
by Alejandro Guizar (JIRA)
[ http://jira.jboss.com/jira/browse/JBPM-1072?page=comments#action_12398841 ]
Alejandro Guizar commented on JBPM-1072:
----------------------------------------
Alexey Kostylev said:
Yes, you are right. If we have 1 job executor on 1 machine all is
working fine. The problem was if launching several job executors on 1
machine. But this is also is not a real problem for us.
The real problem is:
The result of query 'JobSession.getFirstAcquirableJob' is always
returned from the method acquireJobs() not depending on if optimistic
locking is failed or not.
Here is the log:
...
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG JobExecutorThread :
querying for acquirable job...
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG JobExecutorThread :
trying to obtain a lock for 'job[444795]'
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG JbpmContext :
closing jbpmContext org.jbpm.JbpmContext@274874
<mailto:org.jbpm.JbpmContext@274874>
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG Services : closing
service 'persistence':
org.jbpm.persistence.db.DbPersistenceService@116ce6e
<mailto:org.jbpm.persistence.db.DbPersistenceService@116ce6e>
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG
DbPersistenceService : committing hibernate transaction
org.hibernate.transaction.JDBCTransaction@105f759
<mailto:org.hibernate.transaction.JDBCTransaction@105f759>
12:09:42,687 [JbpmJobExector:192.168.125.34:1] INFO DbPersistenceService
: optimistic locking failed
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG
DbPersistenceService : rolling back hibernate transaction
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG
DbPersistenceService : closing hibernate session
12:09:42,687 [JbpmJobExector:192.168.125.34:1] INFO Services : problem
closing service 'persistence': optimistic locking failed
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG Services : closing
service 'tx': org.jbpm.tx.TxService@4aa085
<mailto:org.jbpm.tx.TxService@4aa085>
12:09:42,687 [JbpmJobExector:192.168.125.34:1] DEBUG JobExecutorThread :
obtained locks on following jobs: [job[444795]]
...
> Concurrent JobExecutors can process the same job in parallel
> ------------------------------------------------------------
>
> Key: JBPM-1072
> URL: http://jira.jboss.com/jira/browse/JBPM-1072
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Core Engine
> Affects Versions: jBPM jPDL 3.2.2
> Environment: Linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
> MySQL 5.0.22
> Reporter: Jiri Pechanec
> Assigned To: Koen Aers
> Attachments: expl.tar.gz
>
>
> Attached is a simple test case that
> 1) Deploys process definition with two nodes
> 2) Starts 20 executor threads
> 2) Starts the process instance that will asynchronously execute action on the second node
> 4) The second node writes a record to the database
> The test case needs to be executed multiple times to see the incorrect behaviour.
> This is an example of run output
> Isol 8
> Action 1
> Success 0
> Failure 0
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2
> Action 2 1
> Action 2 1
> Action 2
> Action 2 1
> Explanation of the outcome
> 9 job executors successfully executed the node action (same job) including database operation. All database operations were comitted (9 new records were created)
--
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