How Table Cleaner(scheduled job) works to execute sys_auto_flush records ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2021 11:04 PM
Suppose I have a Incident and few tables are dependent on Incident like Incident Task and Customer. I wanna know if I have sys_auto_flush record created for all these tables with 'Age in Seconds' as 9 months for each, which table record will get deleted first and will all record be deleted at once for that table or it will pick few records for 1st iteration of deletion ? How exactly will the Scheduled job(Table Cleaner) work ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 03:36 AM
hi
No doubt Servicenow Team has well explained the table cleaner but I haven't got exact answer to my question.
Here's the thing, if you remember what I wanna know, is that considering there are multiple sys_auto_flush records that we are moving to higher instances at once with matching field and age in seconds as same for all records , in this Case I wanna know which table will be first picked up by table cleaner to delete the records ?
And there's one more thing I've mentioned as a question in that article ....
Suppose If we have any table( incident_task) which is dependent on another table( incident) as shown below .
And the Table cleaner picks up 'incident_task' first to delete the data, how will this work since 'Incident' records are not yet deleted and hence the condition will not be matched.
What will happen in this case ?
If you've answers to my question , kindly reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 10:11 PM
Hi
there is no guaranteed order in the selection of tables in case of equal conditions.
And regarding your second question:
A reference to the parent Incident record is just a string value. Therefore no technical dependencies exist and the incident_task records can be deleted without any problems.
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 11:11 PM
Okay one doubt is clear, there's no guaranteed order in table selection.
Just one more thing if you can confirm.
Be it any number of condition for a table(in a sys_auto_flush record), as Table Cleaner runs every hour it might take time((delete few records at one go) but will delete all records that matches the condition for each record configured in sys_auto_flush table.
Can you confirm if this is the case if we have dependency of more than one table on a table for which we have configured sys_auto_flush record ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2021 03:20 AM
Hi
"Can you confirm if this is the case if we have dependency of more than one table on a table for which we have configured sys_auto_flush record ??"
sorry, but I don't understand this question. Two "if" in one sentence are irritating me!
But maybe I am not the right person to answer your questions as I did not build the table cleaner.
Kind regards
Maik