Open wankai opened 10 years ago
lgtm. @xiangli-cmu @unihorn ?
I guess it might want to filter out io.ErrNotExist. @xiangli-cmu
@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"`
}
@wankai It may be a new raft machine, and doesn't have that file yet.
an obviously bug in readConf() function