From 5009aa417c5e6aade1f4863ddcf489772b7363cc Mon Sep 17 00:00:00 2001 From: Andre Duffeck Date: Thu, 6 Jul 2023 12:44:16 +0200 Subject: [PATCH] Fix IsMetaFile() for .mlock files (#4042) * Fix IsMetaFile() for .mlock files * Add changelog --- changelog/unreleased/fix-0-byte-msgpack.md | 1 + pkg/storage/utils/decomposedfs/metadata/messagepack_backend.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/unreleased/fix-0-byte-msgpack.md b/changelog/unreleased/fix-0-byte-msgpack.md index c86038111e..618aad5304 100644 --- a/changelog/unreleased/fix-0-byte-msgpack.md +++ b/changelog/unreleased/fix-0-byte-msgpack.md @@ -2,5 +2,6 @@ Bugfix: fix writing 0 byte msgpack metadata File metadata is now written atomically to be more resilient during timeouts +https://github.com/cs3org/reva/pull/4042 https://github.com/cs3org/reva/pull/4034 https://github.com/cs3org/reva/pull/4033 diff --git a/pkg/storage/utils/decomposedfs/metadata/messagepack_backend.go b/pkg/storage/utils/decomposedfs/metadata/messagepack_backend.go index a2713f1ceb..b41a08bff4 100644 --- a/pkg/storage/utils/decomposedfs/metadata/messagepack_backend.go +++ b/pkg/storage/utils/decomposedfs/metadata/messagepack_backend.go @@ -276,7 +276,7 @@ func (b MessagePackBackend) loadAttributes(ctx context.Context, path string, sou // IsMetaFile returns whether the given path represents a meta file func (MessagePackBackend) IsMetaFile(path string) bool { - return strings.HasSuffix(path, ".mpk") || strings.HasSuffix(path, ".mpk.lock") + return strings.HasSuffix(path, ".mpk") || strings.HasSuffix(path, ".mlock") } // Purge purges the data of a given path