8000 bugfix, return err when readConf() failed by wankai · Pull Request #228 · goraft/raft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archive 8000 d by the owner on Sep 6, 2018. It is now read-only.

bugfix, return err when readConf() failed #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

bugfix, return err when readConf() failed #228

wants to merge 1 commit into from

Conversation

wankai
Copy link
@wankai wankai commented Jun 28, 2014

an obviously bug in readConf() function

@philips
Copy link
Member
philips commented Jul 29, 2014

lgtm. @xiangli-cmu @unihorn ?

@yichengq
Copy link
Contributor

I guess it might want to filter out io.ErrNotExist.
@xiangli-cmu

@wankai
Copy link
Author
wankai commented Aug 1, 2014

@unihorn , config is as follow. if config file doesn't exist, peers will be nil, then this raft server will have no idea of others.

type Config struct {
    CommitIndex uint64 `json:"commitIndex"`
    // TODO decide what we need to store in peer struct
    Peers []*Peer `json:"peers"`
}

@yichengq
Copy link
Contributor
yichengq commented Aug 1, 2014

@wankai It may be a new raft machine, and doesn't have that file yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0