Missing Oracle-indexes on upgraded schema; possible deadlock

Description

The activiti create sql file for oracle creates required indexes when creating foreign key constraints. For example, the constraint ACT_FK_EXE_PROCDEF requires an index on ACT_RU_EXECUTION(PROC_DEF_ID_), and creates that index immediately before creating that constraint (https://github.com/Activiti/Activiti/blob/97d221fa0a779fbf8dbf7ee056613223cd693155/modules/activiti-engine/src/main/resources/org/activiti/db/create/activiti.oracle.create.engine.sql#L240).

However, when the same constraint is created in an upgrade script, no such index is created (https://github.com/Activiti/Activiti/blob/97d221fa0a779fbf8dbf7ee056613223cd693155/modules/activiti-engine/src/main/resources/org/activiti/db/upgrade/activiti.oracle.upgradestep.510.to.511.engine.sql#L18).

The consequence of such a missing index could often be a database deadlock, so this is quite severe.

Environment

None

Status

Assignee

Joram Barrez

Reporter

EirikE

Labels

None

Components

Affects versions

5.11

Priority

High
Configure