Red Hat Bugzilla – Bug 1259701
Spring tests: starting of process gets stuck on Sybase 15.7
Last modified: 2015-11-04 11:25:15 EST
Created attachment 1069767 [details]
Description of problem:
Tried to run community test -RuntimeManagerInitSpringTest- against Sybase 15.7 database. Test gets stuck when trying to create sample process (RuntimeManagerInitSpringTest.testSimpleTaskInvocation() line: 78).
This error happens just when using Per process instance Runtime manager with local transactions: configurations LOCAL_EMF_PER_PROCESS_INSTANCE_PATH and LOCAL_EM_PER_PROCESS_INSTANCE_PATH.
Hanging stacktrace attached.
Version-Release number of selected component (if applicable):
droolsjbpm-integration, project kie-spring, master branch
Configure Sybase 15.7 as database for Spring tests:
- Sybase driver as maven dependency
- database properties in AbstractJbpmSpringTest.setupPoolingDataSource()
- hibernate.dialect in resources/jbpm/persistence-local(jta).xml
Steps to Reproduce:
Test gets stuck in RuntimeManagerInitSpringTest.testSimpleTaskInvocation() line: 78 when testing Per process instance Runtime manager with local transactions.
All tests pass.
problem was caused by Sybase that by default uses all pages locking which is sort of table lock (and indexes). That does not work well for engines such as jBPM which is tailored to run on just rows. So such locking scheme shall be enabled for jBPM tables.
Fix for this is an update to DDL script for sybase to always configure data rows as locking scheme which corresponds to row locking.
Unfortunately this cannot be enabled for hibernate auto ddl (or at least I have no idea how to do it). So the tests must be ran after DDL script based schema creation.
Alternatively system wide settings can be enabled on Sybase to always use data rows locking. Though it might have some side effects for other applications running on same db so this needs to be checked before enabling system wide setting. Command to enable it is as follows:
sp_configure 'lock scheme', 0, datarows
Verified with DDL script, test passed.