Skip to content

Commit

Permalink
fix(decomposedfs): dont postprocess 0 byte files
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <[email protected]>
  • Loading branch information
kobergj committed Jul 25, 2024
1 parent 53e5aaf commit 8e49ef6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/zero-byte-uploads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Zero byte uploads

Zero byte uploads would trigger postprocessing which lead to breaking pipelines.

https://github.com/cs3org/reva/pull/4778
2 changes: 1 addition & 1 deletion pkg/storage/utils/decomposedfs/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (session *OcisSession) FinishUpload(ctx context.Context) error {
metrics.UploadProcessing.Inc()
metrics.UploadSessionsBytesReceived.Inc()

if session.store.pub != nil {
if session.store.pub != nil && session.info.Size > 0 {
u, _ := ctxpkg.ContextGetUser(ctx)
s, err := session.URL(ctx)
if err != nil {
Expand Down

0 comments on commit 8e49ef6

Please sign in to comment.