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

Fix multipart #1041

Merged
merged 2 commits into from
Dec 10, 2024
Merged

Fix multipart #1041

merged 2 commits into from
Dec 10, 2024

Conversation

smallhive
Copy link
Contributor

api/layer/multipart_upload.go Outdated Show resolved Hide resolved
internal/neofs/tree.go Show resolved Hide resolved
api/layer/multipart_upload.go Show resolved Hide resolved
api/layer/multipart_upload.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 84 lines in your changes missing coverage. Please review.

Project coverage is 26.15%. Comparing base (b038931) to head (9e27bca).
Report is 79 commits behind head on master.

Files with missing lines Patch % Lines
api/layer/multipart_upload.go 0.00% 75 Missing ⚠️
internal/neofs/tree.go 0.00% 9 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@smallhive smallhive force-pushed the fix-multipart branch 2 times, most recently from 9e27bca to d77b82c Compare December 9, 2024 05:59
@roman-khimov roman-khimov added this to the v0.33.0 milestone Dec 9, 2024
api/layer/multipart_upload.go Outdated Show resolved Hide resolved

eg.Go(func() error {
for _, element := range part.Elements {
elementObj, err := n.objectGet(ctx, bktInfo, element.OID)
Copy link
Member

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.

Copy link
Contributor Author

@smallhive smallhive Dec 10, 2024

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]>
@smallhive smallhive force-pushed the fix-multipart branch 4 times, most recently from b74fbe9 to c1e68b9 Compare December 10, 2024 06:46
Reupload each small part, which we sliced manually before.

Signed-off-by: Evgenii Baidakov <[email protected]>
@roman-khimov roman-khimov merged commit cdd9ce6 into master Dec 10, 2024
13 of 15 checks passed
@roman-khimov roman-khimov deleted the fix-multipart branch December 10, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants