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

raft: fix deadlock during PreVote migration process #20

Closed
siddontang opened this issue Jan 27, 2018 · 2 comments
Closed

raft: fix deadlock during PreVote migration process #20

siddontang opened this issue Jan 27, 2018 · 2 comments
Labels
Feature Related to a major feature. Help Wanted An issue with unsolved problems, looking for help.

Comments

@siddontang
Copy link
Contributor

refer etcd-io/etcd#8525

@siddontang siddontang added Help Wanted An issue with unsolved problems, looking for help. Feature Related to a major feature. labels Jan 27, 2018
@csmoe
Copy link
Contributor

csmoe commented Feb 5, 2018

The pre_vote field of Raft is private:

pub struct Raft<T: Storage> {
    ...
    pub check_quorum: bool,
    pre_vote: bool,
    ...

but pre_vote was changed directly in etcd-io/etcd#8525 :

func newPreVoteMigrationCluster(t *testing.T) *network {
    ...
    n1.preVote = true
    ... 

I couldn't find any methods to change the value of pre_vote after a raft was instantiated, how can I reset the pre_vote field of a raft?

@siddontang
Copy link
Contributor Author

Hi @csmoe

Seem you can make the field public like check_quorum does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Related to a major feature. Help Wanted An issue with unsolved problems, looking for help.
Projects
None yet
Development

No branches or pull requests

2 participants