Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Term signal #2236

Merged
merged 2 commits into from
Apr 10, 2015
Merged

Term signal #2236

merged 2 commits into from
Apr 10, 2015

Conversation

benbjohnson
Copy link
Contributor

Overview

This pull request changes raft so that term changes are made immediately and term change signals are made afterward. Previously, election timeouts were invalidated by incoming term changes which caused an election loop.

Stale term was also fixed and http/pprof was added too.

}
return
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can now pull pprof profiles if you run:

$ go tool pprof http://localhost:8086/debug/pprof/profile

More info on the net/http/pprof page. Make sure you change their :6060 ports to :8086 though.

select {
case l.terms <- struct{}{}:
default:
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Term updates immediately but signals asynchronously.

This commit changes raft so that term changes are made immediately and
term change signals are made afterward. Previously, election timeouts
were invalidated by incoming term changes which caused an election loop.

Stale term was also fixed and http/pprof was added too.
@otoolep
Copy link
Contributor

otoolep commented Apr 10, 2015

+1

benbjohnson added a commit that referenced this pull request Apr 10, 2015
@benbjohnson benbjohnson merged commit 3404386 into master Apr 10, 2015
@toddboom toddboom deleted the term-signal branch May 5, 2015 18:26
mark-rushakoff pushed a commit that referenced this pull request Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants