[#1085] writecache: set metaOnly flag for receiving from priority channel

This can lead to objects being flushed twice.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-19 11:47:52 +03:00 committed by LeL
parent 7eedb23eb7
commit 9f963e001b

View file

@ -175,6 +175,7 @@ func (c *cache) flushWorker(num int) {
// TODO(fyrchik): do this once in N iterations depending on load
select {
case obj = <-priorityCh:
metaOnly = num%3 == 1
default:
select {
case obj = <-c.directCh: