-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add resource size info to transfer type OCM share #2104
Comments
@glpatcern @michielbdejong @gmgigi96 do we regard discovering the size of the transfer a task of reva or the efss ? (ps. I know its a required field, but are we aiming to keep reva as light as possible in that regard or spare the efss ?) |
@redblom well someone would have to traverse the tree to be sent out and execute I'd implement it in the Reva gateway, factored out for everyone. |
Implemented with #3891 |
At WP4.4 it is discussed that it would be useful for a receiver of a transfer type OCM share to know the size of the transfer before accepting it. Although the size cannot be guaranteed, a sender could still add more files to a transfer folder which would also be transferred after acceptance in case of a transfer retry, the receiving end could limit the transfer to the expected size (data cap). Or, from the end user viewpoint, have an idea of what to expect.
For the receiver it is not possible to stat the resource to be transferred before accepting it because the webdav reference to it is only created after accepting the share. Thus, the size info must be send by the creator of the resource as a specific size parameter.
The initiator of the datatx type OCM share adds the current size to the opaque field of the request:
reva/cmd/reva/transfer-create.go
Line 112 in 44c9fa1
Next we add the size as an option of the protocol section of the OCM share request:
reva/pkg/ocm/share/manager/json/json.go
Line 257 in 44c9fa1
And the datatx driver will be called specifying the size in a new options parameter:
reva/pkg/datatx/datatx.go
Line 30 in 44c9fa1
In the driver implementation the decision to cap on size is based on the value of 2 new datatx config flags:
The text was updated successfully, but these errors were encountered: