Skip to content

Commit

Permalink
Fix deadlock in metastore
Browse files Browse the repository at this point in the history
The interaction of continuous query service, the meta-store loading
and initializing raft state, and syncing node info could cause a
deadlock in some instances.  There was an extra read-lock taken by isLeader()
when it already had a read-lock.  Removing this extra lock fixes the startup
deadlock.

Fixes influxdata#3607

(Cherry-picked from 0286a3e)
  • Loading branch information
jonseymour committed Nov 19, 2015
1 parent 2d604ac commit 0bd3612
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions meta/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,6 @@ func (r *localRaft) leader() string {
}

func (r *localRaft) isLeader() bool {
r.store.mu.RLock()
defer r.store.mu.RUnlock()
if r.raft == nil {
return false
}
Expand Down

0 comments on commit 0bd3612

Please sign in to comment.