Deadlock errors with DB2 databases
There is a tendency for deadlocks to occur if partitions are added to a DB2 database schema with a foreign key constraint that does not include the partition key.
Gateway operations with DB2 databases may fail with deadlock errors if the following conditions are met:
- Foreign key constraints are provisioned on the tables.
- Partitions are provisioned on the tables.
- Gate.Jdbc.Connections is set to a value greater than
1.
If partitions are also created on the tables, having the foreign key constraints will affect how
DB2 addresses referential integrity checking. This will result in DB2 applying additional locking on
the tables, causing concurrent gateway operations to fail because of deadlock errors. This is
referred to as Julie’s Scenario. This situation has been observed to occur on the
REP_AUDIT with the conditions mentioned above.
If this situation occurs, the resolution is to remove the foreign key constraints from the affected tables.