diff --git a/changelog/2.0.0_2022-03-03/uploadsession-specific-processing-flag.md b/changelog/2.0.0_2022-03-03/uploadsession-specific-processing-flag.md new file mode 100644 index 00000000000..def07a36e7a --- /dev/null +++ b/changelog/2.0.0_2022-03-03/uploadsession-specific-processing-flag.md @@ -0,0 +1,5 @@ +Bugfix: upload session specific processing flag + +To make every upload session have a dedicated processing status, upload sessions are now treated as in processing when all bytes have been received instead of checking the node metadata. + +https://github.com/cs3org/reva/pull/4475 diff --git a/pkg/storage/utils/decomposedfs/upload/session.go b/pkg/storage/utils/decomposedfs/upload/session.go index 4107ea5e2dd..c6fed249e7b 100644 --- a/pkg/storage/utils/decomposedfs/upload/session.go +++ b/pkg/storage/utils/decomposedfs/upload/session.go @@ -295,13 +295,9 @@ func (s *OcisSession) MTime() time.Time { return t } -// IsProcessing returns true if the node has entered postprocessing state +// IsProcessing returns true if all bytes have been received. The node then has entered postprocessing state. func (s *OcisSession) IsProcessing() bool { - n, err := s.Node(context.Background()) - if err != nil { - return false - } - return n.IsProcessing(context.Background()) + return s.info.Size == s.info.Offset } // binPath returns the path to the file storing the binary data.