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

Change raft snapshot interval to 5 seconds #2591

Merged
merged 1 commit into from
Dec 13, 2016
Merged

Conversation

kyhavlov
Copy link
Contributor

Check for snapshots more frequently to keep the raft file smaller and avoid doing a huge truncation when writing lots of keys very quickly. Should help with #866.

@@ -371,6 +374,7 @@ func (s *Server) setupRaft() error {

// Make sure we set the LogOutput.
s.config.RaftConfig.LogOutput = s.config.LogOutput
s.config.RaftConfig.SnapshotInterval = raftSnapshotInterval
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a constant and not a late-bound thing like the logger, this should probably go into DefaultConfig() over config.go.

@slackpad
Copy link
Contributor

LGTM

@kyhavlov kyhavlov merged commit 13aa0ba into master Dec 13, 2016
@kyhavlov kyhavlov deleted the snapshot-interval branch December 13, 2016 00:15
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