12-19-2012 05:42 AM
Successfully deployed 'target/classes/bpm/test/activiti/simple/Simple10_usertask.bpmn20.xml'
bpm.test.activiti.ActivitiTests.testSimple1_usertask
samples: 1659
max: 98
average: 5.54249547920434
median: 4
Rate = 165.30490235153448/s
However with 2 threads there is deadlockSuccessfully deployed 'target/classes/bpm/test/activiti/simple/Simple10_usertask.bpmn20.xml'
bpm.test.activiti.ActivitiTests.testSimple1_usertask
Dec 19, 2012 10:04:02 AM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: org.h2.jdbc.JdbcSQLException: Deadlock detected. The current transaction was rolled back. Details: "
Session #2 (user: SA) is waiting to lock PUBLIC.ACT_RU_TASK while locking PUBLIC.ACT_RU_EXECUTION (exclusive).
Session #4 (user: SA) is waiting to lock PUBLIC.ACT_RU_EXECUTION while locking PUBLIC.ACT_RU_TASK (exclusive)."; SQL statement:
delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ? [40001-132]
### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.deleteExecution-Inline
### The error occurred while setting parameters
### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?
### Cause: org.h2.jdbc.JdbcSQLException: Deadlock detected. The current transaction was rolled back. Details: "
Session #2 (user: SA) is waiting to lock PUBLIC.ACT_RU_TASK while locking PUBLIC.ACT_RU_EXECUTION (exclusive).
Session #4 (user: SA) is waiting to lock PUBLIC.ACT_RU_EXECUTION while locking PUBLIC.ACT_RU_TASK (exclusive)."; SQL statement:
delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ? [40001-132]
This is code for specific test (the number of threads is specified in the annotation) @Test
@PerfTest(duration = 10000, threads = 2)
public void testSimple1_usertask() {
Map<String, Object> processParameters = new HashMap<String, Object>();
ProcessInstance processInstance = runtimeService.startProcessInstanceById(simple1_usertask.getId(), processParameters);
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
assertNotNull(task);
taskService.complete(task.getId());
processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).singleResult();
assertNull(processInstance);
}
12-19-2012 10:17 AM
org.h2.jdbc.JdbcSQLException
12-19-2012 10:45 AM
12-19-2012 11:21 AM
12-19-2012 12:21 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.