From d199fa5c73057329c3e29f55fdb72ebb7c343b42 Mon Sep 17 00:00:00 2001 From: flash Date: Sun, 14 Jun 2026 01:00:46 +0200 Subject: [PATCH] fix(posix): make warmupSpaceRootCache errors non-fatal The warmupSpaceRootCache function runs synchronously during tree initialization. If the NATS KV cache is temporarily unavailable (e.g. during upgrades or migrations), the hard error abort prevents the storage-users service from starting entirely, which cascades into proxy startup failures (502). Change both the cache write error and the caller to log-and-continue instead of aborting. The subsequent async WarmupIDCache will retry and fill in any missing entries. --- pkg/storage/fs/posix/tree/tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/storage/fs/posix/tree/tree.go b/pkg/storage/fs/posix/tree/tree.go index 8d9a55c813..0d320f5f31 100644 --- a/pkg/storage/fs/posix/tree/tree.go +++ b/pkg/storage/fs/posix/tree/tree.go @@ -183,7 +183,7 @@ func New(lu node.PathLookup, bs node.Blobstore, um usermapper.Mapper, trashbin * // warmup the cache for all space roots right away so clients and migrations don't get confused when starting with a cold cache err := t.warmupSpaceRootCache(o) if err != nil { - return nil, errors.Wrap(err, "error warming up space root cache") + t.log.Error().Err(err).Msg("error warming up space root cache, continuing") } // scan the whole tree asynchronously to pick up new nodes @@ -235,7 +235,7 @@ func (t *Tree) warmupSpaceRootCache(options *options.Options) error { } err = t.idCache.Set(context.TODO(), spaceID, spaceID, path) if err != nil { - return errors.Wrap(err, "could not cache space root path") + t.log.Error().Err(err).Str("spaceID", spaceID).Str("path", path).Msg("could not cache space root path, continuing") } } return nil