app/vmselect: typo fix after 0168e21fe32776e2f7f003f88e0e6e490eb2dcb0g

This commit is contained in:
Aliaksandr Valialkin 2020-07-23 14:11:08 +03:00
parent 7aa5b48508
commit 55ed07add1

View file

@ -890,7 +890,7 @@ func (tbfw *tmpBlocksFileWrapper) WriteBlock(mb *storage.MetricBlock) error {
metricName := mb.MetricName
addrs := tbfw.m[string(metricName)]
addrs = append(addrs, addr)
if len(addrs) > 0 {
if len(addrs) > 1 {
// An optimization: avoid memory allocation and copy for already existing metricName key in tbfw.m.
tbfw.m[string(metricName)] = addrs
} else {