From b5b558d774186e23f38d1e91b6e4fdc5b86dd50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 24 Jan 2024 15:56:18 +0100 Subject: [PATCH] no need to unmark postprocessing when it was not started MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- ...no-need-to-unmark-postprocessing-when-it-was-not-started.md | 3 +++ pkg/storage/utils/decomposedfs/upload/session.go | 2 +- pkg/storage/utils/decomposedfs/upload/upload.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/no-need-to-unmark-postprocessing-when-it-was-not-started.md diff --git a/changelog/unreleased/no-need-to-unmark-postprocessing-when-it-was-not-started.md b/changelog/unreleased/no-need-to-unmark-postprocessing-when-it-was-not-started.md new file mode 100644 index 0000000000..1f416ffa76 --- /dev/null +++ b/changelog/unreleased/no-need-to-unmark-postprocessing-when-it-was-not-started.md @@ -0,0 +1,3 @@ +Bugfix: no need to unmark postprocessing when it was not started + +https://github.com/cs3org/reva/pull/4476 diff --git a/pkg/storage/utils/decomposedfs/upload/session.go b/pkg/storage/utils/decomposedfs/upload/session.go index c6fed249e7..f438d684f9 100644 --- a/pkg/storage/utils/decomposedfs/upload/session.go +++ b/pkg/storage/utils/decomposedfs/upload/session.go @@ -295,7 +295,7 @@ func (s *OcisSession) MTime() time.Time { return t } -// IsProcessing returns true if all bytes have been received. The node then has entered postprocessing state. +// IsProcessing returns true if all bytes have been received. The session then has entered postprocessing state. func (s *OcisSession) IsProcessing() bool { return s.info.Size == s.info.Offset } diff --git a/pkg/storage/utils/decomposedfs/upload/upload.go b/pkg/storage/utils/decomposedfs/upload/upload.go index 64c3cb047c..2f2713b454 100644 --- a/pkg/storage/utils/decomposedfs/upload/upload.go +++ b/pkg/storage/utils/decomposedfs/upload/upload.go @@ -191,7 +191,7 @@ func (session *OcisSession) FinishUpload(ctx context.Context) error { n, err := session.store.CreateNodeForUpload(session, attrs) if err != nil { - session.store.Cleanup(ctx, session, true, false, true) + session.store.Cleanup(ctx, session, true, false, false) return err }