diff --git a/changelog/unreleased/bugfix-ignore-write-error-after-read.md b/changelog/unreleased/bugfix-ignore-write-error-after-read.md new file mode 100644 index 00000000000..4ae94ed77db --- /dev/null +++ b/changelog/unreleased/bugfix-ignore-write-error-after-read.md @@ -0,0 +1,10 @@ +Bugfix: Ignore write error after successful read + +In the settings service, we're caching data in the NATSjs store. When reading +service information, that information is written in the cache. Previously, +failing to write that information in the cache caused an error, despite +correct information being retrieved from the service successfully. Now, if the +information isn't written in the cache, we log the failure, but return the +read information without error. + +https://github.com/owncloud/ocis/pull/12772 diff --git a/services/settings/pkg/store/metadata/cache.go b/services/settings/pkg/store/metadata/cache.go index c5fc6a4d15e..c5945ea653c 100644 --- a/services/settings/pkg/store/metadata/cache.go +++ b/services/settings/pkg/store/metadata/cache.go @@ -113,7 +113,8 @@ func (c *CachedMDC) ReadDir(ctx context.Context, id string) ([]string, error) { c.logger.Error().Err(err).Msg("ReadDir: failed to update dirs cache") } - return s, err + // return valid data regardless of cache write failure + return s, nil } // MakeDirIfNotExist invalidates the cache