forked from TrueCloudLab/frostfs-node
[#656] policer: Add "bad" testcase
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
054e3ef3d3
commit
88d50e4c77
4 changed files with 49 additions and 25 deletions
|
@ -52,7 +52,12 @@ func (p *Policer) shardPolicyWorker(ctx context.Context) {
|
|||
}
|
||||
|
||||
if p.objsInWork.add(addr.Address) {
|
||||
p.processObject(ctx, addr)
|
||||
err := p.processObject(ctx, addr)
|
||||
if err != nil {
|
||||
p.log.Error(logs.PolicerUnableToProcessObj,
|
||||
zap.Stringer("object", addr.Address),
|
||||
zap.String("error", err.Error()))
|
||||
}
|
||||
p.cache.Add(addr.Address, time.Now())
|
||||
p.objsInWork.remove(addr.Address)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue