Free RLock prior to returning

pull/8580/head
Stuart Carnie 2017-07-08 07:14:50 -07:00
parent dba3ce1a42
commit 2ccdda72a1
1 changed files with 2 additions and 0 deletions

View File

@ -330,11 +330,13 @@ func (m *Measurement) TagSets(shardID uint64, opt influxql.IteratorOptions) ([]*
// Abort if the query was killed // Abort if the query was killed
select { select {
case <-opt.InterruptCh: case <-opt.InterruptCh:
m.mu.RUnlock()
return nil, influxql.ErrQueryInterrupted return nil, influxql.ErrQueryInterrupted
default: default:
} }
if opt.MaxSeriesN > 0 && seriesN > opt.MaxSeriesN { if opt.MaxSeriesN > 0 && seriesN > opt.MaxSeriesN {
m.mu.RUnlock()
return nil, fmt.Errorf("max-select-series limit exceeded: (%d/%d)", seriesN, opt.MaxSeriesN) return nil, fmt.Errorf("max-select-series limit exceeded: (%d/%d)", seriesN, opt.MaxSeriesN)
} }