Run new job by default - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License
  1. Change the prop table cleaner default properties in alfresco-global.properties:
    1. Enable the new prop cleaner algorithm:
       system.prop_table_cleaner.algorithm=V2
      
    2. Set the prop cleaner to delete:
       system.delete_not_exists.read_only=false
      
    3. Set the prop cleaner timeout:
       # This will stop the next batch from being processed if the elapsed time from
       the job start is greater than 1 hour
       system.delete_not_exists.timeout_seconds=3600
      
  2. Restart the application server.
  3. Open a web browser.
    1. Go to <alfresco_ip>/alfresco/s/enterprise/admin/admin-log-settings.
    2. Enable debug logging to see the amount of data that was deleted by the algorithm:

      Change the log setting to DEBUG for package name org.alfresco.repo.domain.schema.script.DeleteNotExistsExecutor.

      Note: The algorithm could delete more than the initial value due to cascading deletes being enabled in some tables.
  4. Open a web browser, go to <alfresco_ip>/alfresco/s/enterprise/admin/admin-scheduledjobs, and execute the propTablesCleanupJobDetail job.
  5. Check the logs to see which values were deleted from each table.
     alf_prop_root
     alf_prop_value
     alf_prop_string_value
     alf_prop_serializable_value
     alf_prop_double_value
    

    You should see something like:

     [org.alfresco.repo.domain.schema.script.DeleteNotExistsExecutor]
     [DefaultScheduler_Worker-10] Script deleted a total of X items from table
     alf_prop_root.
    					

Noteworthy:

  • Since the server(s) and database could be configured in a specific way for each customer, we recommend that you test the setting for the timeout property. This should be changed according to the capabilities of the system or its load.

      # This will stop the next batch from being processed if the elapsed time from
      the job start is greater than 1 hour
      system.delete_not_exists.timeout_seconds=3600
    
  • The algorithm can be further improved by changing the batch values according to the capabilities of the system:

      # Items processed in one prepared statement
      system.delete_not_exists.batchsize=100000
      # Items deleted in one prepared delete statement
      system.delete_not_exists.delete_batchsize=1000
    
  • Note: The algorithm could delete more than the initial value stated when running in read-only mode due to cascading deletes being enabled in some tables.
  • For more detailed logging, change the log setting to TRACE for package name org.alfresco.repo.domain.schema.script.DeleteNotExistsExecutor.

    Note: This could generate a lot of logging, so revert it to its default logging level when not needed.