Browse Source

add validate config for raft (#4332)

pull/4335/head
Konstantin Lebedev 2 years ago
committed by GitHub
parent
commit
de4545c28b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/server/raft_hashicorp.go

4
weed/server/raft_hashicorp.go

@ -121,6 +121,10 @@ func NewHashicorpRaftServer(option *RaftServerOption) (*RaftServer, error) {
c.LogLevel = "Error"
}
if err := raft.ValidateConfig(c); err != nil {
return nil, fmt.Errorf(`raft.ValidateConfig: %v`, err)
}
if option.RaftBootstrap {
os.RemoveAll(path.Join(s.dataDir, ldbFile))
os.RemoveAll(path.Join(s.dataDir, sdbFile))

Loading…
Cancel
Save