forked from TrueCloudLab/frostfs-node
[TrueCloudLab/hrw#2] node: Use typed HRW methods
Update HRW lib and use typed HRW methods to sort shards and nodes Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c3a7039801
commit
6925fb4c59
6 changed files with 7 additions and 4 deletions
|
@ -216,7 +216,7 @@ func (e *StorageEngine) sortShardsByWeight(objAddr interface{ EncodeToString() s
|
|||
weights = append(weights, e.shardWeight(sh.Shard))
|
||||
}
|
||||
|
||||
hrw.SortSliceByWeightValue(shards, weights, hrw.Hash([]byte(objAddr.EncodeToString())))
|
||||
hrw.SortHasherSliceByWeightValue(shards, weights, hrw.Hash([]byte(objAddr.EncodeToString())))
|
||||
|
||||
return shards
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue