Skip to content

Commit

Permalink
Merge pull request #8767 from influxdata/sgc-13-backports
Browse files Browse the repository at this point in the history
Fix deadlock when calling `SeriesIDsAllOrByExpr`
  • Loading branch information
stuartcarnie authored Aug 29, 2017
2 parents ed5eb9f + 963c57a commit 1c9adc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Bugfixes

- [#8755](https://github.com/influxdata/influxdb/pull/8755): Fix race condition accessing `seriesByID` map.
- [#8766](https://github.com/influxdata/influxdb/pull/8766): Fix deadlock when calling `SeriesIDsAllOrByExpr`

## v1.3.4 [2017-08-23]

Expand Down
6 changes: 3 additions & 3 deletions tsdb/index/inmem/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,9 @@ func (m *Measurement) SeriesIDsAllOrByExpr(expr influxql.Expr) (SeriesIDs, error
}

m.mu.RLock()
defer m.mu.RUnlock()

if len(m.seriesByID) == 0 {
l := len(m.seriesByID)
m.mu.RUnlock()
if l == 0 {
return nil, nil
}

Expand Down

0 comments on commit 1c9adc1

Please sign in to comment.