Class DeleteNotExistsV3Executor

java.lang.Object
org.alfresco.repo.domain.schema.script.DeleteNotExistsExecutor
org.alfresco.repo.domain.schema.script.DeleteNotExistsV3Executor
All Implemented Interfaces:
StatementExecutor

public class DeleteNotExistsV3Executor extends DeleteNotExistsExecutor
Same logic as DeleteNotExistsExecutor with the following changes:

- filters the queries by unique values

- eager close of result sets

- we store all the ids in memory and process them from there - the secondary ids are stored in a unique list without duplicate values.

- we only cross 2 sets (the potential ids to delete from the primary table with the set of all secondary ids in that range) removing all elements from the second set from the first set

- every {pauseAndRecoverBatchSize} rows deleted we close all prepared statements and close the connection and sleep for {pauseAndRecoverTime} milliseconds. This is necessary to allow the DBMS to perform the background tasks without load from ACS. When we do not do this and if we are performing millions of deletes, the connection eventually gets aborted.

Author:
Eva Vasques