IV82047: Cleanup Agent is causing deadlock errors when it runs


A deadlock report occurs when the Cleanup Agent runs. Below is the sample error message that creates a log noise during the cleanup process:

2016-02-08 22:57:55,204 ERROR [com.tririga.architecture.util.CleanupUtil](PlatformMaintenanceScheduler) ** Could not perform BO Cleanupcom.tririga.platform.persistence.PersistenceException: Error executing sql: Sql[SQL=delete from ibs_spec_assignments where not exists (select 1 from ibs_spec where ibs_spec_assignments.spec_id = ibs_spec.spec_id),DB transaction ID=(None)] Caused by: StatementCallback; SQL [delete from ibs_spec_assignments where not exists (select 1 from ibs_spec where ibs_spec_assignments.spec_id = ibs_spec.spec_id)]; Transaction (Process ID 326) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.; nested exception is java.sql.SQLException: Transaction (Process ID 326) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.[MID-923667903]

The Cleanup Agent (Platform Maintenance Scheduler) can issue very large SQL delete statements that can cause a deadlock. The Platform Maintenance Scheduler has been enhanced to run the delete commands in smaller batches. In addition, the Platform Maintenance Scheduler has better deadlock detection and will retry commands if a deadlock is detected. If a deadlock is encountered that cannot be resolved, it will continue with the rest of the cleanup commands.

[Admin: This post is related to the 07.14.15 post about renaming the Cleanup Agent to Platform Maintenance Scheduler.]

Continue reading

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s