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

Add an optional ConfigurationStore interface #339

Merged
merged 13 commits into from
Jun 20, 2019
Merged

Conversation

briankassouf
Copy link
Contributor

FSMs that satisfy this interface will be sent configuration change updates after they are fully committed to the log

raft_test.go Outdated Show resolved Hide resolved
Copy link
Member

@banks banks left a comment

Choose a reason for hiding this comment

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

Looks great @briankassouf!

A couple minor Qs/suggestions inline.

configuration.go Outdated Show resolved Hide resolved
configuration.go Outdated Show resolved Hide resolved
fsm.go Outdated Show resolved Hide resolved
raft_test.go Outdated Show resolved Hide resolved
Copy link
Member

@banks banks left a comment

Choose a reason for hiding this comment

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

Nice! LGTM!

// in memory and snapshotting periodically. By storing configuration changes, the
// persistent FSM state can behave as a complete snapshot, and be able to recover
// without an external snapshot just for persisting the raft configuration.
type ConfigurationStore interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Random drive-by comment: if this interface is only useful for FSMs, should you embed the FSM interface in here as well?

I tend to find that to be a fairly self-documenting behavior I appreciate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, i'll add that

@briankassouf briankassouf merged commit 51bdddc into master Jun 20, 2019
@briankassouf briankassouf deleted the configuration-store branch June 20, 2019 17:04
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.

3 participants