From 66de22d67c0b7558cee26e026de6b0d8633a8cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 6 Jun 2023 14:35:07 +0200 Subject: [PATCH] delete file metadata from correct database and table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/delete-correct-cache-entry.md | 4 ++++ pkg/storage/cache/filemetadata.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/delete-correct-cache-entry.md diff --git a/changelog/unreleased/delete-correct-cache-entry.md b/changelog/unreleased/delete-correct-cache-entry.md new file mode 100644 index 0000000000..bc066fd5a0 --- /dev/null +++ b/changelog/unreleased/delete-correct-cache-entry.md @@ -0,0 +1,4 @@ +Bugfix: when removing metadata always use correct database and table + +https://github.com/cs3org/reva/pull/3943 + diff --git a/pkg/storage/cache/filemetadata.go b/pkg/storage/cache/filemetadata.go index 9f8828cccc..41053b4f28 100644 --- a/pkg/storage/cache/filemetadata.go +++ b/pkg/storage/cache/filemetadata.go @@ -39,5 +39,5 @@ func NewFileMetadataCache(store string, nodes []string, database, table string, // RemoveMetadata removes a reference from the metadata cache func (c *fileMetadataCache) RemoveMetadata(path string) error { - return c.s.Delete(path) + return c.Delete(path) }