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

Pivot for container placement #216

Closed
carpawell opened this issue Apr 19, 2022 · 4 comments · Fixed by #396
Closed

Pivot for container placement #216

carpawell opened this issue Apr 19, 2022 · 4 comments · Fixed by #396
Assignees
Labels
question Further information is requested
Milestone

Comments

@carpawell
Copy link
Member

carpawell commented Apr 19, 2022

Why does netmap accept any pivot?

In practice a node always uses cid. So maybe it would be better to change the interface to accept cid to prevent incorrect usage.

@carpawell carpawell added question Further information is requested refactor labels Apr 19, 2022
@carpawell carpawell added this to the v1.0.0 milestone Apr 19, 2022
@fyrchik
Copy link
Contributor

fyrchik commented Apr 20, 2022

It is really a feature, but I agree cid in the signature is more descriptive, especially, given that the function is called GetContainerNodes. Same can be done for GetPlacementVectors(oid).

@cthulhu-rider
Copy link
Contributor

Decided to accept typed parameters (oid.ID, cid.ID).

@carpawell carpawell self-assigned this Apr 22, 2022
@carpawell carpawell removed the triage label Apr 22, 2022
@carpawell carpawell removed their assignment Nov 30, 2022
@roman-khimov
Copy link
Member

Is there any way to GetContainerNodes(cid) and GetPlacementVectors(cid, oid)? These look OK for low-level things (with cid/oid), but I'd expect something easier to use from SDK.

@cthulhu-rider
Copy link
Contributor

This is the only method for now

func (m NetMap) ContainerNodes(p PlacementPolicy, pivot []byte) ([][]NodeInfo, error) {

It'd be nice to have helpers for cid, oid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants