Documentation
¶
Overview ¶
Package snapshotcache disposes of staged restore files and evicts preserved snapshot files from the host page cache after an actor restore completes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // RetryDelays are the backoff intervals between post-restore eviction // passes when dirty pages are waiting for background kernel writeback. RetryDelays = []time.Duration{ 500 * time.Millisecond, 1500 * time.Millisecond, 3000 * time.Millisecond, } )
Functions ¶
func DropFile ¶
func DropFile(t File)
DropFile unlinks t.Path if it still refers to the same inode and size.
func EvictFiles ¶
EvictFiles evicts clean cached pages of targets via POSIX_FADV_DONTNEED and returns true if any target still exists and has pages (clean or dirty) remaining in cache. Files with dirty or writeback pages are skipped so FADV_DONTNEED never forces synchronous disk writeback I/O.
func EvictWithRetries ¶
func EvictWithRetries(targets []File)
EvictWithRetries runs EvictFiles immediately and, while pages remain in cache, retries after each interval in RetryDelays to evict pages once background kernel writeback cleans them.