forked from TrueCloudLab/frostfs-sdk-go
[TrueCloudLab/hrw#2] sdk-go: Use typed HRW methods
Update HRW pkg and use typed HRW methods to sort nodes Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
e355e5eeba
commit
2cbc585edd
5 changed files with 8 additions and 6 deletions
|
@ -152,7 +152,7 @@ func (m NetMap) PlacementVectors(vectors [][]NodeInfo, pivot []byte) ([][]NodeIn
|
|||
for i := range vectors {
|
||||
result[i] = make([]NodeInfo, len(vectors[i]))
|
||||
copy(result[i], vectors[i])
|
||||
hrw.SortSliceByWeightValue(result[i], nodes(result[i]).weights(wf), h)
|
||||
hrw.SortHasherSliceByWeightValue(result[i], nodes(result[i]).weights(wf), h)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue