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

upload session specific processing flag #4475

Merged
merged 1 commit into from
Jan 24, 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
Original file line number Diff line number Diff line change
@@ -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
8 changes: 2 additions & 6 deletions pkg/storage/utils/decomposedfs/upload/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading