Skip to content

Commit

Permalink
Merge pull request #4889 from aduffeck/fix-stuck-0-byte-uploads
Browse files Browse the repository at this point in the history
Fix stuck 0 byte uploads
  • Loading branch information
butonic authored Oct 17, 2024
2 parents 464930c + 23a3f76 commit cb66c28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/improve-posixfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ Enhancement: Improve posixfs stability and performance

The posixfs storage driver saw a number of bugfixes and optimizations.

https://github.com/cs3org/reva/pull/4889
https://github.com/cs3org/reva/pull/4877

5 changes: 3 additions & 2 deletions pkg/storage/utils/decomposedfs/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ func (session *OcisSession) FinishUpload(ctx context.Context) error {
return err
}
}

// increase the processing counter for every started processing
// will be decreased in Cleanup()
metrics.UploadProcessing.Inc()
Expand Down Expand Up @@ -213,7 +212,9 @@ func (session *OcisSession) FinishUpload(ctx context.Context) error {
}
}

if !session.store.async {
// if the upload is synchronous or the upload is empty, finalize it now
// for 0-byte uploads we take a shortcut and finalize isn't called elsewhere
if !session.store.async || session.info.Size == 0 {
// handle postprocessing synchronously
err = session.Finalize()
session.store.Cleanup(ctx, session, err != nil, false, err == nil)
Expand Down

0 comments on commit cb66c28

Please sign in to comment.