Fix possible deadlock when queries and delete series run concurrently

This locks showeed up in a deadlock systems running queries and
delete series across a large dataset.  Queries should not need to
lock the tsdb.Store for writes
pull/6627/head
Jason Wilder 2016-05-13 17:04:12 -06:00
parent 1bfc832046
commit 57d4becaec
1 changed files with 2 additions and 2 deletions

View File

@ -686,8 +686,8 @@ func (s *Store) ExpandSources(sources influxql.Sources) (influxql.Sources, error
// IteratorCreators returns a set of all local shards as iterator creators.
func (s *Store) IteratorCreators() influxql.IteratorCreators {
s.mu.Lock()
defer s.mu.Unlock()
s.mu.RLock()
defer s.mu.RUnlock()
a := make(influxql.IteratorCreators, 0, len(s.shards))
for _, sh := range s.shards {