Share functionality of placement building between components #753

Open
opened 2025-12-28 17:20:35 +00:00 by sami · 5 comments
Owner

Originally created by @cthulhu-rider on GitHub (Sep 20, 2022).

Object placement is build using netmap.Source and container.Source in most scenarios. Also there are some similar cases when we use same placement approach, e.g. shard evacuation introduced here and remote placement builder.

I propose to concentrate all placement functionality in single shared code space in order to easily reuse it in new tasks.

Originally created by @cthulhu-rider on GitHub (Sep 20, 2022). Object placement is build using `netmap.Source` and `container.Source` in most scenarios. Also there are some similar cases when we use same placement approach, e.g. shard evacuation introduced [here](https://github.com/nspcc-dev/neofs-node/pull/1800/) and remote placement [builder](https://github.com/nspcc-dev/neofs-node/blob/c7f85994e550d4c990c08d1ea6529ec99c954770/pkg/services/object/util/placement.go#L72). I propose to concentrate all placement functionality in single shared code space in order to easily reuse it in new tasks.
Author
Owner

@fyrchik commented on GitHub (Sep 20, 2022):

With a proper interface, tree server can use this component too.

@fyrchik commented on GitHub (Sep 20, 2022): With a proper interface, tree server can use this component too.
Author
Owner

@cthulhu-rider commented on GitHub (Mar 5, 2024):

  • #2674 brings foundation for this
  • #2722 continues (they need to be sync)

caching is very meaningful for app performance and efficiency. Some attempts were made, but they are buggy, so lets also fix them

suggest to w8 4 prelim work finish

@cthulhu-rider commented on GitHub (Mar 5, 2024): * #2674 brings foundation for this * #2722 continues (they need to be sync) caching is very meaningful for app performance and efficiency. Some [attempts](https://github.com/nspcc-dev/neofs-node/blob/master/pkg/services/object_manager/placement/netmap.go) were made, but they are buggy, so lets also fix them suggest to w8 4 prelim work finish
Author
Owner

@roman-khimov commented on GitHub (Oct 2, 2024):

Do we have anything left here?

@roman-khimov commented on GitHub (Oct 2, 2024): Do we have anything left here?
Author
Owner

@cthulhu-rider commented on GitHub (Oct 3, 2024):

for SN:

  1. ControlService.Evacuate nspcc-dev/neofs-node@f33949e195/pkg/services/control/server/evacuate.go (L65-L78)
  2. object ACL nspcc-dev/neofs-node@f33949e195/pkg/services/object/acl/v2/classifier.go (L130)
  3. routing for container volume estimations nspcc-dev/neofs-node@f33949e195/cmd/neofs-node/container.go (L410-L427)
  4. Tree service (multi-op) nspcc-dev/neofs-node@f33949e195/pkg/services/tree/container.go (L35-L60)

object ACL should definitely use shared policy component. Evacuator is rarely used, but better to use it too. Tree and estimations... i wouldnt bother them tbh

finally, whole package should be purged

IR and CLI also apply storage policies to network maps for various needs. Caching doesn't help them, so I would leave everything as is

P.S. refs can be found by .ContainerNodes(

@cthulhu-rider commented on GitHub (Oct 3, 2024): for SN: 1. `ControlService.Evacuate` https://github.com/nspcc-dev/neofs-node/blob/f33949e1958717a33c821376d1cb5b9d5bfcb69f/pkg/services/control/server/evacuate.go#L65-L78 2. object ACL https://github.com/nspcc-dev/neofs-node/blob/f33949e1958717a33c821376d1cb5b9d5bfcb69f/pkg/services/object/acl/v2/classifier.go#L130 3. routing for container volume estimations https://github.com/nspcc-dev/neofs-node/blob/f33949e1958717a33c821376d1cb5b9d5bfcb69f/cmd/neofs-node/container.go#L410-L427 4. Tree service (multi-op) https://github.com/nspcc-dev/neofs-node/blob/f33949e1958717a33c821376d1cb5b9d5bfcb69f/pkg/services/tree/container.go#L35-L60 object ACL should definitely use shared policy component. Evacuator is rarely used, but better to use it too. Tree and estimations... i wouldnt bother them tbh finally, whole [package](https://github.com/nspcc-dev/neofs-node/tree/master/pkg/services/object_manager/placement) should be purged IR and CLI also apply storage policies to network maps for various needs. Caching doesn't help them, so I would leave everything as is P.S. refs can be found by `.ContainerNodes(`
Author
Owner

@cthulhu-rider commented on GitHub (Jun 10, 2025):

minus tree service #3270

@cthulhu-rider commented on GitHub (Jun 10, 2025): minus tree service #3270
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
nspcc-dev/neofs-node#753
No description provided.