nspcc-dev / nspcc-dev/neofs-node
Build node lists for container/object once per request
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
Is your feature request related to a problem? Please describe.
container node sets are requested multiple times, at least for:
- ACL processing (https://github.com/nspcc-dev/neofs-node/blob/6180c090af6c0e73240de230b58d946d8e5f92be/pkg/services/object/acl/v2/classifier.go#L39, https://github.com/nspcc-dev/neofs-node/blob/6180c090af6c0e73240de230b58d946d8e5f92be/pkg/services/object/acl/v2/service.go#L450)
- https://github.com/nspcc-dev/neofs-node/blob/6180c090af6c0e73240de230b58d946d8e5f92be/pkg/services/object/get/get.go#L65
- maybe more
the same is true about container info:
- https://github.com/nspcc-dev/neofs-node/blob/6180c090af6c0e73240de230b58d946d8e5f92be/pkg/services/object/acl/v2/service.go#L515
- https://github.com/nspcc-dev/neofs-node/blob/6180c090af6c0e73240de230b58d946d8e5f92be/pkg/services/object/placement/service.go#L297
- ...
this is excessive. Better to consider the state consistent for the entire request lifetime
cache can amortize the waste of resources
Describe the solution you'd like
get any consistent data only when needed and only once
Additional context
#1803
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the listed call sites in pkg/services/object/acl/v2/classifier.go, pkg/services/object/acl/v2/service.go, pkg/services/object/get/get.go, and pkg/services/object/placement/service.go. Identify how container node sets and container info are obtained across one request, then verify that each consistent value is fetched only when needed and only once during that request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100