User Trail Log Clean-up Task
Task to clean up stale user trail log entries from the database.
It is recommended to schedule this task during a time with little traffic. Depending on the number of stale user trail logs, the task may take some time to complete.
Note: The clean up task ignores tenant IDs, all stale log are deleted regardless of their tenant IDs.
databaseRepository) logRetentionTime) Duration to keep user trail log entries in the database after creation.
Log entries that are older than the specified duration are considered stale and will be removed at the next scheduled clean-up time.
batchSize) During clean-up, user trail log entries are deleted in batches of this size.
This ensures that any row locks on the database are very short-lived, not affecting parallel log insertions. This value should not be set too high to prevent very long running transactions. User trail log clean-up will repeat deleting this number of logs until all logs not within the retention time have been cleaned up. Therefore, this task can take some time when a lot of user trail logs are present.
This size should be chosen so that every batch does not take longer than 5 seconds. The average runtime of the batches can be found in the task's logs.
type: UserTrailLogCleanupTask
id: UserTrailLogCleanupTask-xxxxxx
displayName:
comment:
properties:
batchSize: 1000
databaseRepository:
logRetentionTime: 90d