[
http://jira.jboss.com/jira/browse/JBPM-1072?page=comments#action_12398458 ]
Tom Baeyens commented on JBPM-1072:
-----------------------------------
"
As I investigate this issue I find that the problem with running several JobExecutor
instances on the same machine is in query condition:
where ( (job.lockOwner is null) or (job.lockOwner = :lockOwner) )
So 'lockOwner' is the same for all instances on the same machine, so every
instance capture jobs that are executing on other instances at that time.
"
first, every *thread* has its own name. each thread within the same job executor should
get it's own sequence number. so it's ip-address:thread-sequence-number. so
locking is based on thread, not on the machine level. this should work as long as you
have 1 job executor on one machine.
i read that query as 'get all jobs that are not yet locked or for which I am the lock
owner'. that should be good, no ?
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