mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-07-29 11:33:25 +00:00
add validate config for raft (#4332)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user