Cleans up deleted nodes and dangling transactions that are old enough.
Schedule cleanup
You can schedule or manually trigger thenodeServiceCleanupTrigger script to clean up deleted nodes, danglingtransactions, and property values tables (i.e.alf_transaction,alf_node andalf_node_properties tables).
ThenodeServiceCleanupTrigger is aMonitoredCronTrigger script, and a schedule to run this script can be set in thealfresco-global.properties file or by using JMX.
To run this script on a schedule, add the following line to thealfresco-global.properties file:
system.nodeServiceCleanup.cronExpression=0 0 21 * * ?
The default setting for this property is a Quartz Cron expression,0 0 21 * * ?, which runs every day at 9pm.Alfresco recommends that you don’t change the default value unless required.
Below are the default settings for the V1 cleanup job:
# --Node cleanup batch -default settingssystem.node_cleanup.delete_batchSize=1000system.node_table_cleaner.algorithm=V1index.tracking.minRecordPurgeAgeDays=30index.tracking.purgeSize=7200000
Using the V2 algorithm
The V2 algorithm is designed to operate at scale by deleting items in batches of configurable size. Currently, the V2algorithm is supported only by PostgreSQL.
Change the node cleanup batch default properties inalfresco-global.properties:
Enable the new cleanup algorithm:
system.node_table_cleaner.algorithm=V2
Set the batch size. This property defines the number of items deleted in one prepared delete statement:
system.node_cleanup.delete_batchSize=1000
Set the tracking purge size. This property specifies the size of the chunk (in millisec). Default is a couple of hours.This property is not relevant for the V2 algorithm:
index.tracking.purgeSize=7200000
Set the minimum age (in days) before nodes and transactions get purged:
index.tracking.minRecordPurgeAgeDays=30