cli: Allow to split object on the client side #471

Merged
fyrchik merged 1 commit from acid-ant/frostfs-node:feature/cut-obj-client into master 2023-07-26 21:07:59 +00:00
Member

Close #483

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

Close #483 Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant force-pushed feature/cut-obj-client from 0935281e49 to 990a306e82 2023-06-27 08:09:47 +00:00 Compare
acid-ant force-pushed feature/cut-obj-client from 990a306e82 to c24e94cb1b 2023-06-27 11:08:33 +00:00 Compare
acid-ant force-pushed feature/cut-obj-client from c24e94cb1b to 9806392642 2023-06-29 06:54:06 +00:00 Compare
acid-ant changed title from WIP: cli: Allow to split object on the client side to cli: Allow to split object on the client side 2023-06-29 06:56:19 +00:00
acid-ant requested review from storage-core-committers 2023-06-29 06:56:30 +00:00
acid-ant requested review from storage-core-developers 2023-06-29 06:56:30 +00:00
dstepanov-yadro approved these changes 2023-06-29 07:55:10 +00:00
aarifullin approved these changes 2023-06-29 09:16:22 +00:00
acid-ant force-pushed feature/cut-obj-client from 9806392642 to b755f02a6d 2023-07-01 09:33:41 +00:00 Compare
acid-ant force-pushed feature/cut-obj-client from b755f02a6d to f02295d8f7 2023-07-01 11:58:43 +00:00 Compare
Author
Member

Fixed linter errors.

Fixed linter errors.
acid-ant force-pushed feature/cut-obj-client from f02295d8f7 to 12f6a9443e 2023-07-03 07:11:03 +00:00 Compare
fyrchik reviewed 2023-07-03 08:09:35 +00:00
@ -363,0 +370,4 @@
func (x *PutObjectPrm) convertToSDKPrm(ctx context.Context) (client.PrmObjectPutInit, error) {
var putPrm client.PrmObjectPutInit
if x.sessionToken != nil {
putPrm.WithinSession(*x.sessionToken)
Owner

We might avoid creating a session in this case: it is needed when object header is changed, not the case here.

We might avoid creating a session in this case: it is needed when object header is changed, not the case here.
Author
Member

Looks like we don't need to read it at all when generating header locally.

Looks like we don't need to read it at all when generating header locally.
fyrchik marked this conversation as resolved
@ -54,6 +55,7 @@ func initObjectPutCmd() {
flags.Bool("disable-timestamp", false, "Do not set well-known timestamp attribute")
flags.Uint64VarP(&putExpiredOn, commonflags.ExpireAt, "e", 0, "The last active epoch in the life of the object")
flags.Bool(noProgressFlag, false, "Do not show progress bar")
flags.Bool(splitLocallyFlag, false, "Split big object on the client side")
Owner

It's not only this, small objects are not split but prepared.
May be "prepare object header(s) on the client"?

It's not only this, small objects are not split but prepared. May be "prepare object header(s) on the client"?
Author
Member

Right, how about this:
Generate object header on the client side (for big object - split locally too)
and option name - gen-locally

Right, how about this: `Generate object header on the client side (for big object - split locally too)` and option name - `gen-locally`
fyrchik marked this conversation as resolved
acid-ant force-pushed feature/cut-obj-client from 12f6a9443e to 27feeacf3c 2023-07-03 11:00:03 +00:00 Compare
fyrchik reviewed 2023-07-03 12:02:36 +00:00
@ -363,0 +391,4 @@
}
putPrm.WithObjectMaxSize(res.Info().MaxObjectSize())
putPrm.WithEpochSource(epochSource(res.Info().CurrentEpoch()))
putPrm.WithoutHomomorphicHash(true)
Owner

This is also a network setting, not a constant.

This is also a network setting, not a constant.
Author
Member

My fault, fixed.

My fault, fixed.
fyrchik marked this conversation as resolved
acid-ant force-pushed feature/cut-obj-client from 27feeacf3c to 2684eca6b2 2023-07-03 12:44:45 +00:00 Compare
acid-ant force-pushed feature/cut-obj-client from 2684eca6b2 to fa918e69bd 2023-07-03 12:45:08 +00:00 Compare
fyrchik reviewed 2023-07-03 15:05:24 +00:00
@ -54,6 +55,7 @@ func initObjectPutCmd() {
flags.Bool("disable-timestamp", false, "Do not set well-known timestamp attribute")
flags.Uint64VarP(&putExpiredOn, commonflags.ExpireAt, "e", 0, "The last active epoch in the life of the object")
flags.Bool(noProgressFlag, false, "Do not show progress bar")
flags.Bool(generateLocallyFlag, false, "Generate object header on the client side (for big object - split locally too)")
Owner

Maybe prepare-locally?

Maybe `prepare-locally`?
Author
Member

Why not, updated.

Why not, updated.
fyrchik marked this conversation as resolved
acid-ant force-pushed feature/cut-obj-client from fa918e69bd to 4c248d573e 2023-07-03 15:32:06 +00:00 Compare
fyrchik approved these changes 2023-07-04 12:48:06 +00:00
fyrchik merged commit 4c248d573e into master 2023-07-04 12:49:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#471
No description provided.