mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raftexample: New joined node have to start with RestartNode
This commit is contained in:
parent
8d1a8ce044
commit
1b1be43d65
@ -298,14 +298,10 @@ func (rc *raftNode) startRaft() {
|
||||
MaxUncommittedEntriesSize: 1 << 30,
|
||||
}
|
||||
|
||||
if oldwal {
|
||||
if oldwal || rc.join {
|
||||
rc.node = raft.RestartNode(c)
|
||||
} else {
|
||||
startPeers := rpeers
|
||||
if rc.join {
|
||||
startPeers = nil
|
||||
}
|
||||
rc.node = raft.StartNode(c, startPeers)
|
||||
rc.node = raft.StartNode(c, rpeers)
|
||||
}
|
||||
|
||||
rc.transport = &rafthttp.Transport{
|
||||
|
Loading…
x
Reference in New Issue
Block a user