mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ACS-1600 : Error when running propTablesCleanupJob on an env with 100 million records in alf_prop_value (#473)
- commit changes to db anytime `deleteBatchSize` of deleted data is reached
This commit is contained in:
@@ -220,7 +220,6 @@ 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)
|
||||||
{
|
{
|
||||||
@@ -299,6 +298,7 @@ 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())
|
||||||
|
@@ -126,7 +126,6 @@ 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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user