[#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:
parent
7eedb23eb7
commit
9f963e001b
1 changed files with 1 additions and 0 deletions
|
@ -175,6 +175,7 @@ func (c *cache) flushWorker(num int) {
|
||||||
// TODO(fyrchik): do this once in N iterations depending on load
|
// TODO(fyrchik): do this once in N iterations depending on load
|
||||||
select {
|
select {
|
||||||
case obj = <-priorityCh:
|
case obj = <-priorityCh:
|
||||||
|
metaOnly = num%3 == 1
|
||||||
default:
|
default:
|
||||||
select {
|
select {
|
||||||
case obj = <-c.directCh:
|
case obj = <-c.directCh:
|
||||||
|
|
Loading…
Reference in a new issue