Skip to content

Commit

Permalink
Merge pull request #4475 from butonic/uploadsession-specific-processi…
Browse files Browse the repository at this point in the history
…ng-flag

upload session specific processing flag
  • Loading branch information
butonic authored Jan 24, 2024
2 parents 6eec406 + 05f1797 commit f9ec0fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
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

0 comments on commit f9ec0fa

Please sign in to comment.