How to: Understand Trigger data purging

Questions

After enabling Trigger data purging (with the default retention as 30 days),  is there a way in General settings for an administrator to verify that this feature is working properly?

  1. What exactly happens behind the scenes?
  2. Where can I check in the UI that the trigger data has been purged?
  3. Which tables in the database are cleaned up when trigger data is purged?

Answers

  1. It is used to purge the Release Trigger execution data. These execution data will be removed from the database table.
  2. All trigger activity logs of type = EXECUTION and older than the cut-off date will be deleted. So, this will be also reflected in the trigger activity logs from the GUI.
  3. XLR_ACTIVITY_LOGS table is cleaned up.

How to test it

  1. Enable debug logging in conf/logback.xml
<logger name="com.xebialabs.xlrelease.triggers.scheduled.quartz.TriggerDataPurgeJob" level="debug" />
  1. Reduce the triggerDataPurgeJob Interval to 2 minutes (by default it is 30 minutes) from the backend by adding the following lines in xl-release.conf:
xl {
durations {
triggerDataPurgeJobInterval = 2 minutes
}
}
  1. Start Release

  1. Reduced the purge interval to 1 hour from GUI. It should delete some old logs if you have them.

  1. In the logs, you will notice messages related to Executing trigger data purge job
$ ~/xebialabs/release/xl-release-10.3.2-server/log  tail -f  xl-release.log| grep -i "Executing
trigger data purge job"

2022-02-15 17:09:45.274 [release-trigger-pool-1-thread-18] {} DEBUG c.x.x.t.s.quartz.TriggerData
PurgeJob - Executing trigger data purge job
2022-02-15 17:11:45.271 [release-trigger-pool-1-thread-28] {} DEBUG c.x.x.t.s.quartz.TriggerData
PurgeJob - Executing trigger data purge job
2022-02-15 17:13:45.270 [release-trigger-pool-1-thread-13] {} DEBUG c.x.x.t.s.quartz.TriggerData
PurgeJob - Executing trigger data purge job

Considerations

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.