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

(cherry picked from commit 8bd4fc502d)

closes https://github.com/influxdata/influxdb/issues/23460

Co-authored-by: Dane Strandboge <dstrandboge@influxdata.com>
pull/23471/head
davidby-influx 2022-06-16 11:58:10 -07:00 committed by GitHub
parent 07ee889eb3
commit 75ed51b9c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1075,6 +1075,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)