From 0368db95716e9047e0828b5299dd97ddb7ffeee1 Mon Sep 17 00:00:00 2001 From: Michael Habinsky Date: Thu, 14 Dec 2023 12:07:09 -0700 Subject: [PATCH] Keep file cache on shutdown. --- component/file_cache/file_cache.go | 4 +++- setup/baseConfig.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/component/file_cache/file_cache.go b/component/file_cache/file_cache.go index 1119917ff..e16bd9a04 100644 --- a/component/file_cache/file_cache.go +++ b/component/file_cache/file_cache.go @@ -181,7 +181,9 @@ func (c *FileCache) Stop() error { log.Trace("Stopping component : %s", c.Name()) _ = c.policy.ShutdownPolicy() - _ = c.TempCacheCleanup() + if !c.allowNonEmpty { + _ = c.TempCacheCleanup() + } fileCacheStatsCollector.Destroy() diff --git a/setup/baseConfig.yaml b/setup/baseConfig.yaml index 7108e5122..0dcae0091 100644 --- a/setup/baseConfig.yaml +++ b/setup/baseConfig.yaml @@ -106,7 +106,7 @@ file_cache: low-threshold: <% disk space consumed which triggers eviction to stop when previously triggered by the high-threshold. Default - 60> create-empty-file: true|false allow-non-empty-temp: true|false - cleanup-on-start: true|false + cleanup-on-start: true|false policy-trace: true|false offload-io: true|false sync-to-flush: true|false