Revert "ACS-1600 : Error when running propTablesCleanupJob on an env with 100 million records in alf_prop_value (#473)" (#1358)

This reverts commit 00b0b21668.
This commit is contained in:
evasques
2022-09-07 10:10:25 +01:00
committed by GitHub
parent 69170dde35
commit b8ac41ac0d
2 changed files with 2 additions and 1 deletions

View File

@@ -220,6 +220,7 @@ public class DeleteNotExistsExecutor implements StatementExecutor
{ {
// Process batch // Process batch
primaryId = processPrimaryTableResultSet(primaryPrepStmt, secondaryPrepStmts, deletePrepStmt, deleteIds, primaryTableName, primaryColumnName, tableColumn); primaryId = processPrimaryTableResultSet(primaryPrepStmt, secondaryPrepStmts, deletePrepStmt, deleteIds, primaryTableName, primaryColumnName, tableColumn);
connection.commit();
if (primaryId == null) if (primaryId == null)
{ {
@@ -298,7 +299,6 @@ public class DeleteNotExistsExecutor implements StatementExecutor
if (deleteIds.size() == deleteBatchSize) if (deleteIds.size() == deleteBatchSize)
{ {
deleteFromPrimaryTable(deletePrepStmt, deleteIds, primaryTableName); deleteFromPrimaryTable(deletePrepStmt, deleteIds, primaryTableName);
connection.commit();
} }
if (!resultSet.next()) if (!resultSet.next())

View File

@@ -117,6 +117,7 @@ public class MySQLDeleteNotExistsExecutor extends DeleteNotExistsExecutor
{ {
// Process batch // Process batch
primaryId = processPrimaryTableResultSet(primaryPrepStmt, secondaryPrepStmts, deletePrepStmt, deleteIds, primaryTableName, primaryColumnName, tableColumn); primaryId = processPrimaryTableResultSet(primaryPrepStmt, secondaryPrepStmts, deletePrepStmt, deleteIds, primaryTableName, primaryColumnName, tableColumn);
connection.commit();
if (primaryId == null) if (primaryId == null)
{ {