Products | Versions |
---|---|
TIBCO BPM Enterprise (formerly TIBCO ActiveMatrix BPM) | 4.0, 4.1, 4.2 |
Modifying the indexes used on the 'ec_managed_obj_lifecycle' table:
1. on SQL Server: prevents a known issue from occurring where, in certain circumstances, deadlocks can occur on the
'ec_managed_obj_lifecycle' table.
2. on SQL Server, Oracle or DB2: improves database query performance.
On SQL Server, if deadlocks occur on the 'ec_managed_obj_lifecycle' table, an error similar to the following example is
written to the BPM log file:
28 Jan 2019 15:18:10,042 [PVM:DB Process Worker-25] [ERROR] org.hibernate.util.JDBCExceptionReporter - Transaction
(Process ID 110) was deadlocked on lock | communication buffer resources with another process and has been chosen as
the deadlock victim. Rerun the transaction.
28 Jan 2019 15:18:10,042 [PVM:DB Process Worker-25] [ERROR] com.tibco.n2.ec.core.triggers.TriggerExecutor - =================================================
28 Jan 2019 15:18:10,042 [PVM:DB Process Worker-25] [ERROR] com.tibco.n2.ec.core.triggers.TriggerExecutor - Error
processing trigger com.tibco.n2.ec.core.triggers.impl.ManagedObjectLifecycleTrigger@617c0e70!
org.hibernate.exception.LockAcquisitionException: could not execute native bulk manipulation query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:82)
.
.
at com.tibco.n2.ec.core.triggers.impl.ManagedObjectLifecycleTrigger.handleEvent(ManagedObjectLifecycleTrigger.
java:70)
.
.
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 110) was deadlocked on lock |
communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the
transaction.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.
java:390)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.
java:340)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:308)
at org.tranql.connector.jdbc.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:165)
at org.tranql.connector.jdbc.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:106)
at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:165)
... 52 more
The required index modifications are:
1. Remove the existing clustered index - the 'event_pk' primary key - from the 'ec_managed_obj_lifecycle' table.
('event_pk' can be safely removed as it is not used by any queries.)
2. Add a new clustered index on the 'managed_obj_id' column of the 'ec_managed_obj_lifecycle' table.