fix: lost TSI reference / close TagValueSeriesIDIterator in error case (#23461)

pull/23310/merge
Dane Strandboge 2022-06-16 13:35:45 -05:00 committed by GitHub
parent 9e556864a3
commit 8bd4fc502d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1009,6 +1009,7 @@ func (i *Index) TagValueSeriesIDIterator(name, key, value []byte) (tsdb.SeriesID
for _, p := range i.partitions {
itr, err := p.TagValueSeriesIDIterator(name, key, value)
if err != nil {
tsdb.SeriesIDIterators(a).Close()
return nil, err
} else if itr != nil {
a = append(a, itr)