forked from TrueCloudLab/frostfs-node
[#92] Refactor policer and add some unit tests
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
0c5b025788
commit
f9730f090d
13 changed files with 640 additions and 310 deletions
|
@ -84,11 +84,12 @@ func (s *Server) replicate(ctx context.Context, addr oid.Address, obj *objectSDK
|
|||
}
|
||||
|
||||
var res replicatorResult
|
||||
var task replicator.Task
|
||||
task.SetObject(obj)
|
||||
task.SetObjectAddress(addr)
|
||||
task.SetCopiesNumber(1)
|
||||
task.SetNodes(nodes)
|
||||
task := replicator.Task{
|
||||
NumCopies: 1,
|
||||
Addr: addr,
|
||||
Obj: obj,
|
||||
Nodes: nodes,
|
||||
}
|
||||
s.replicator.HandleTask(ctx, task, &res)
|
||||
|
||||
if res.count == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue