Skip to content

housekeeping: Make `CleanStaleData` configurable

Karthik Nayak requested to merge 4736-housekeeping-prework into master

CleanStaleData is an aggregator of multiple cleanup functions. There is no way of configuring the required cleanup functions when calling CleanStaleData.

To make it config friendly, we introduce CleanStaleDataConfig which will be the configuration used by CleanStaleData. CleanStaleData then calls the specified cleanup functions as mentioned in the config.

Also introduce OnlyStaleReferenceLockCleanup, which generates a config which only contains the reference lock cleanup function with a specified grace period. This is done by making findStaleReferenceLocks a closure which works on a given grace period.

Part of #4736 (closed)

Edited by Christian Couder

Merge request reports