Skip to main content

create_file_purger

Function create_file_purger 

Source
pub fn create_file_purger(
    gc_enabled: bool,
    path_type: PathType,
    scheduler: SchedulerRef,
    sst_layer: AccessLayerRef,
    cache_manager: Option<CacheManagerRef>,
    file_ref_manager: FileReferenceManagerRef,
) -> FilePurgerRef
Expand description

Creates a file purger based on the storage type of the access layer. Should be use in combination with Gc Worker.

If the storage is local file system, a LocalFilePurger is created, which deletes the files from both the storage and the cache.

If the storage is an object store, an ObjectStoreFilePurger is created, which only manages SST file references. Shared SSTs and their indexes are retained for global GC.