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 #3607
  • Loading branch information
jwilder committed Aug 26, 2015
1 parent 458b38e commit 5d42b21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Please see the *Features* section below for full details.
- [#3824](https://github.com/influxdb/influxdb/issues/3824): tsdb.Point.MarshalBinary needs to support all number types
- [#3828](https://github.com/influxdb/influxdb/pull/3828): Support all number types when decoding a point
- [#3853](https://github.com/influxdb/influxdb/pull/3853): Use 4KB default block size for bz1
- [#3607](https://github.com/influxdb/influxdb/issues/3607): Fix unable to query influxdb due to deadlock in metastore. Thanks @ccutrer!

## v0.9.2 [2015-07-24]

Expand Down
2 changes: 0 additions & 2 deletions meta/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,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 5d42b21

Please sign in to comment.