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

storage: Refactor raft.Storage methods #15957

Closed
bdarnell opened this issue May 16, 2017 · 2 comments
Closed

storage: Refactor raft.Storage methods #15957

bdarnell opened this issue May 16, 2017 · 2 comments
Assignees
Labels
C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. E-easy Easy issue to tackle, requires little or no CockroachDB experience
Milestone

Comments

@bdarnell
Copy link
Contributor

storage.Replica currently implements the etcd/raft.Storage interface directly, which exposes methods with externally-imposed names. Some of these methods require locks to be held (e.g. FirstIndex, but they cannot follow our usual convention of a Locked suffix (they also have some very generic-sounding names like Entries). We should define these methods on a new replicaRaftStorage type alias instead of *Replica itself so they are not used with misleading names elsewhere in the storage package. Any methods that need to be accessible within package storage can be defined on *Replica with a name like raftFirstIndexLocked.

See #15935 (comment)

@bdarnell bdarnell added C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. E-easy Easy issue to tackle, requires little or no CockroachDB experience labels May 16, 2017
@a6802739
Copy link
Contributor

I could have a see on this part.

@bdarnell
Copy link
Contributor Author

Go ahead @a6802739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. E-easy Easy issue to tackle, requires little or no CockroachDB experience
Projects
None yet
Development

No branches or pull requests

3 participants