forked from TrueCloudLab/frostfs-node
[#569] writecache: Refactor flush
Make single RUnlock call instead of two. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
0cb0fc1735
commit
32c282ca10
1 changed files with 1 additions and 3 deletions
|
@ -138,13 +138,11 @@ func (c *cache) flushSmallObjects(ctx context.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
if count == 0 {
|
||||
c.modeMtx.RUnlock()
|
||||
if count == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
c.modeMtx.RUnlock()
|
||||
|
||||
c.log.Debug(logs.WritecacheTriedToFlushItemsFromWritecache,
|
||||
zap.Int("count", count),
|
||||
zap.String("start", base58.Encode(lastKey)))
|
||||
|
|
Loading…
Reference in a new issue