Skip to content

Conversation

@cthulhu-rider
Copy link
Contributor

@cthulhu-rider cthulhu-rider force-pushed the ec-get branch 7 times, most recently from 1a25190 to 340a149 Compare August 11, 2025 12:12
@codecov
Copy link

codecov bot commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 60.30534% with 156 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.01%. Comparing base (dd83657) to head (dffbbc8).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/services/object/get/ec.go 66.04% 67 Missing and 24 partials ⚠️
pkg/services/object/get/util.go 7.50% 36 Missing and 1 partial ⚠️
cmd/neofs-node/object.go 0.00% 9 Missing ⚠️
pkg/services/object/get/container.go 56.25% 5 Missing and 2 partials ⚠️
pkg/services/object/get/exec.go 73.91% 4 Missing and 2 partials ⚠️
internal/ec/ec.go 50.00% 2 Missing and 1 partial ⚠️
pkg/services/object/get/service.go 0.00% 2 Missing ⚠️
cmd/neofs-node/policy.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3497      +/-   ##
==========================================
+ Coverage   25.71%   26.01%   +0.29%     
==========================================
  Files         659      660       +1     
  Lines       49399    49766     +367     
==========================================
+ Hits        12705    12945     +240     
- Misses      35685    35784      +99     
- Partials     1009     1037      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cthulhu-rider cthulhu-rider force-pushed the ec-get branch 4 times, most recently from 17e09c9 to 7f286bf Compare August 12, 2025 12:29
@cthulhu-rider cthulhu-rider force-pushed the ec-get branch 7 times, most recently from 689dbc4 to 243ea9c Compare August 26, 2025 14:19
@cthulhu-rider cthulhu-rider marked this pull request as ready for review August 26, 2025 14:50
Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there be issues for TODOs or some separate PR that fixes them? We once had work that was only related to going through every TODO to fix it or create a new issue for it.

return object.Object{}, nil, errors.New("all nodes failed")
}

defer rc.Close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this panic in theory, if for above is empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only in theory, if some expectations of behavior are violated

return *parentHdr, nil, nil
}

buf := make([]byte, partHdr.PayloadSize())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it be gigabytes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be up to MaxObjectSize net setting

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, missed that there are part and parent headers (confusing naming btw, at least, i misunderstood)

it can be up to MaxObjectSize net setting

ok, but even in this case, is it ok to always allocate so much memory? found TODOs about streaming but isn't it necessary to solve ASAP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it necessary to solve ASAP

no. And not only due to not yet resolved streaming issue, but cuz decoder can now work in-mem only (#3501)

@cthulhu-rider
Copy link
Contributor Author

Will there be issues for TODOs or some separate PR that fixes them? We once had work that was only related to going through every TODO to fix it or create a new issue for it.

all TODOs will be resolved later. There are many of them, so i dont wanna create issue for each. Prefer to just have them in code

@carpawell
Copy link
Member

Prefer to just have them in code

Dont mind, just wanted to hear that it is not a final solution and the next iteration will be soon.

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unaddressed TODOs should have corresponding issues.

@cthulhu-rider cthulhu-rider force-pushed the ec-get branch 6 times, most recently from 64bd139 to db69124 Compare September 5, 2025 10:51
return object.Object{}, err
}

fmt.Println(err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except fmt.Println.

@roman-khimov
Copy link
Member

Needs to be rebased now.

@cthulhu-rider cthulhu-rider force-pushed the ec-get branch 2 times, most recently from d4a62f0 to c94c0c4 Compare September 8, 2025 07:58
// and parity servers work fast, availability can still be provided. Right now, for example, if one server
// responds after the context deadline, whole operation fails. Think how this can be accurately improved.
// TODO: explore streaming options. See reedsolomon.NewStream. Cmp performance. https://github.com/nspcc-dev/neofs-node/issues/3501
// TODO: if routine in the loop fails, we may already be in a situation when we have to get parity parts.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue this

func (c *clientCacheWrapper) InitGetObjectStream(ctx context.Context, node netmap.NodeInfo, pk ecdsa.PrivateKey,
cnr cid.ID, id oid.ID, sTok *session.Object, bTok *bearer.Token, local, verifyID bool, xs []string) (object.Object, io.ReadCloser, error) {
// TODO: code is copied from pkg/services/object/get/container.go:63. Worth sharing?
// TODO: we may waste resources doing this per request. Make once on network map change instead.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issues this

return object.Object{}, nil, err
}

// TODO: SkipChecksumVerification() turns off checking all object checksums. Better to keep checking
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue this

// TODO: track https://github.com/nspcc-dev/neofs-api/issues/269.
return errors.New("invalid request: EC part requested in container without EC policy")
}
// TODO: deny if node is not in the container?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue this

@cthulhu-rider
Copy link
Contributor Author

rebased and created issues for meaningful TODOs. Will open new PR for refactoring ones

@roman-khimov roman-khimov merged commit 1a9aedd into master Sep 8, 2025
21 of 22 checks passed
@roman-khimov roman-khimov deleted the ec-get branch September 8, 2025 10:04
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.

4 participants