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

Placement functions are buggy #438

Closed
notimetoname opened this issue Jun 2, 2023 · 1 comment · Fixed by #480
Closed

Placement functions are buggy #438

notimetoname opened this issue Jun 2, 2023 · 1 comment · Fixed by #480
Assignees
Labels
bug Something isn't working
Milestone

Comments

@notimetoname
Copy link
Contributor

notimetoname commented Jun 2, 2023

Placement is built using Capacity and Price attrs as a criterion for HRW sorting. But looking for a minimum Price in the placement vector behaves strangely: when it finds 0 Price it saves the next element as the minimum.
In short, consider the test.

@notimetoname notimetoname added the bug Something isn't working label Jun 2, 2023
@notimetoname notimetoname changed the title Placement function is buggy Placement functions are buggy Jun 2, 2023
@roman-khimov roman-khimov added this to the v1.0.0-rc10 milestone Jun 2, 2023
@roman-khimov
Copy link
Member

Fixing them is likely to cause some data storm, maybe that's where we could also fix the node wrt its load data "placement".

carpawell added a commit to carpawell/neofs-sdk-go that referenced this issue Jul 31, 2023
Do not return next element if `0` is being facing.
Closes nspcc-dev#438

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to carpawell/neofs-sdk-go that referenced this issue Jul 31, 2023
Do not return next element if `0` is being facing. Also, add a public key to
the test nodes. It is used in `Hash()` method and, therefore, is the main
start point in the HWR sorting, without it, every node is considered the
same, so it is hard to pick a good value, cause sorting is random for the
same hashes.
Closes nspcc-dev#438.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to carpawell/neofs-sdk-go that referenced this issue Jul 31, 2023
Do not return next element if `0` is being facing. Also, add a public key to
the test nodes. It is used in `Hash()` method and, therefore, is the main
start point in the HWR sorting, without it, every node is considered the
same, so it is hard to pick a good test value, cause sorting is random for
the same hashes.
Closes nspcc-dev#438.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit to carpawell/neofs-sdk-go that referenced this issue Jul 31, 2023
Do not return next element if `0` is being facing. Also, add a public key to
the test nodes. It is used in `Hash()` method and, therefore, is the main
start point in the HWR sorting, without it, every node is considered the
same, so it is hard to pick a good test value, cause sorting is random for
the same hashes.
Closes nspcc-dev#438.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
roman-khimov added a commit that referenced this issue Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants