Skip to content

Commit

Permalink
Persist term to disk when it changes
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Apr 9, 2015
1 parent 73de68c commit 566f655
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [#2200](https://github.com/influxdb/influxdb/pull/2200): Re-enable Continuous Queries.
- [#2203](https://github.com/influxdb/influxdb/pull/2203): Fix race condition on continuous queries.
- [#2217](https://github.com/influxdb/influxdb/pull/2217): Only revert to follower if new term is greater.
- [#2219](https://github.com/influxdb/influxdb/pull/2219): Persist term change to disk when candidate. Thanks @cannium

## v0.9.0-rc20 [2015-04-04]

Expand Down
2 changes: 1 addition & 1 deletion raft/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ func (l *Log) candidateLoop(closing <-chan struct{}) State {

// Increment term and request votes.
l.mu.Lock()
l.term++
l.mustSetTerm(l.term + 1)
l.votedFor = l.id
term := l.term
l.mu.Unlock()
Expand Down

0 comments on commit 566f655

Please sign in to comment.