Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stuck 0 byte uploads #4889

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading