-
Notifications
You must be signed in to change notification settings - Fork 15
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 multipart #1041
Fix multipart #1041
Conversation
296ca9e
to
c7cb522
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1041 +/- ##
==========================================
- Coverage 26.67% 26.15% -0.52%
==========================================
Files 88 92 +4
Lines 14564 15568 +1004
==========================================
+ Hits 3885 4072 +187
- Misses 10244 11039 +795
- Partials 435 457 +22 ☔ View full report in Codecov by Sentry. |
9e27bca
to
d77b82c
Compare
api/layer/multipart_upload.go
Outdated
|
||
eg.Go(func() error { | ||
for _, element := range part.Elements { | ||
elementObj, err := n.objectGet(ctx, bktInfo, element.OID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's overcomplicated. If you have a proper object, you may not care about its individual elements any more, you can just issue a GET for it, let node assemble individual parts, get an io.Reader and do io.Copy from it into larger object io.Writer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a key. If the part has elements, we slice it manually. This means we don't have a proper object and have to do all these actions. In the else section I do exactly what you described, in the next reUploadPart func
Signed-off-by: Evgenii Baidakov <[email protected]>
b74fbe9
to
c1e68b9
Compare
c1e68b9
to
56a3625
Compare
Reupload each small part, which we sliced manually before. Signed-off-by: Evgenii Baidakov <[email protected]>
56a3625
to
ed28289
Compare
Ref nspcc-dev/neofs-testcases#906