Skip to content
This repository has been archived 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.

None yet

3 participants