A 'Table Cleaner' is configured on a specific table in the instance, but the data is not being removed as expected.


NOTE: This is expected behaviour.

Checking in our code, if a table is configured for 'Table Extension' then the 'Table Cleaner' job will not remove any data from that table, even if there is an active 'sysauto_flush' record created for that table.

    public void clean() {
        TableRotationExtension te = TableRotationExtensions.get().getExtension(fTableName);
        if (te != null)

So in the case of the 'sys_email' table, because it is configured with table extension, the Table Cleaner ignores this table and the data is not cleaned.


ServiceNow can truncate this data manually for the customer, or we need to remove the table extension on the table, and replace it with table rotation. The new table rotation schedule can be setup to retain the same amount of data as the table cleaner.

However, if we set this up on an instance with a lot of data in the current 'extension' shards, then the base shard will remain very large until the data is no longer relevant, and queries on the base shard table may be slower than with the original 'extension' shards.


Article Information

Last Updated:2020-02-27 04:17:21