Bug 1259701 - Spring tests: starting of process gets stuck on Sybase 15.7
Spring tests: starting of process gets stuck on Sybase 15.7
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
6.2.0
Unspecified Unspecified
urgent Severity high
: ER5
: 6.2.0
Assigned To: Maciej Swiderski
Karel Suta
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-03 07:54 EDT by Karel Suta
Modified: 2015-11-04 11:25 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Stacktrace (8.21 KB, text/plain)
2015-09-03 07:54 EDT, Karel Suta
no flags Details

  None (edit)
Description Karel Suta 2015-09-03 07:54:52 EDT
Created attachment 1069767 [details]
Stacktrace

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


How reproducible:
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
Run RuntimeManagerInitSpringTest.


Steps to Reproduce:
1.
2.
3.

Actual results:
Test gets stuck in RuntimeManagerInitSpringTest.testSimpleTaskInvocation() line: 78 when testing Per process instance Runtime manager with local transactions.

Expected results:
All tests pass.

Additional info:
Comment 2 Maciej Swiderski 2015-10-19 08:01:53 EDT
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

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/97222b907396f50170060360c7778610754d2be3

6.3.x:
https://github.com/droolsjbpm/jbpm/commit/d9585ca9b2a706ca1a0fb973ea0e5590ecde61d9
Comment 3 Karel Suta 2015-11-04 11:25:15 EST
Verified with DDL script, test passed.
6.2.0ER5

Note You need to log in before you can comment on or make changes to this bug.