Fix append of possible nil iterator.
This commit updates an iterator list to ignore `nil` iterators. Adding a `nil` caused the `SeriesIterators.Close()` to panic.pull/10326/head
parent
c6889b1a95
commit
bdcbad3fc9
|
@ -343,7 +343,9 @@ func (f *LogFile) TagKeySeriesIDIterator(name, key []byte) tsdb.SeriesIDIterator
|
|||
if tv.cardinality() == 0 {
|
||||
continue
|
||||
}
|
||||
itrs = append(itrs, tsdb.NewSeriesIDSetIterator(tv.seriesIDSet()))
|
||||
if itr := tsdb.NewSeriesIDSetIterator(tv.seriesIDSet()); itr != nil {
|
||||
itrs = append(itrs, itr)
|
||||
}
|
||||
}
|
||||
|
||||
return tsdb.MergeSeriesIDIterators(itrs...)
|
||||
|
|
Loading…
Reference in New Issue