aboutsummaryrefslogtreecommitdiff
path: root/weed/command/master.go
diff options
context:
space:
mode:
authorУстюжанин Антон Александрович <ustuzhanin@tochka.com>2020-10-03 14:03:41 +0500
committerУстюжанин Антон Александрович <ustuzhanin@tochka.com>2020-10-03 14:03:41 +0500
commitdc31b194695d1bbc464148c22ec976b88f9b5996 (patch)
treeee2c9a77e29d09c9a8177a8667f0f4ff142d2845 /weed/command/master.go
parent8c82fb7e5f0604953d0f8430f3752c0b2bfcada8 (diff)
downloadseaweedfs-dc31b194695d1bbc464148c22ec976b88f9b5996.tar.xz
seaweedfs-dc31b194695d1bbc464148c22ec976b88f9b5996.zip
fix: restore raft state
Diffstat (limited to 'weed/command/master.go')
-rw-r--r--weed/command/master.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/command/master.go b/weed/command/master.go
index 3cf8cc89b..57a31fa0e 100644
--- a/weed/command/master.go
+++ b/weed/command/master.go
@@ -41,7 +41,7 @@ type MasterOptions struct {
disableHttp *bool
metricsAddress *string
metricsIntervalSec *int
- removeRaftState *bool
+ raftResumeState *bool
}
func init() {
@@ -60,7 +60,7 @@ func init() {
m.disableHttp = cmdMaster.Flag.Bool("disableHttp", false, "disable http requests, only gRPC operations are allowed.")
m.metricsAddress = cmdMaster.Flag.String("metrics.address", "", "Prometheus gateway address <host>:<port>")
m.metricsIntervalSec = cmdMaster.Flag.Int("metrics.intervalSeconds", 15, "Prometheus push interval in seconds")
- m.removeRaftState = cmdMaster.Flag.Bool("raft.removeState", true, "remove raft state on start master server")
+ m.raftResumeState = cmdMaster.Flag.Bool("raft.resumeState", false, "resume state of raft on start master server")
}
var cmdMaster = &Command{
@@ -121,7 +121,7 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
}
// start raftServer
raftServer, err := weed_server.NewRaftServer(security.LoadClientTLS(util.GetViper(), "grpc.master"),
- peers, myMasterAddress, util.ResolvePath(*masterOption.metaFolder), ms.Topo, 5, *masterOption.removeRaftState)
+ peers, myMasterAddress, util.ResolvePath(*masterOption.metaFolder), ms.Topo, 5, *masterOption.raftResumeState)
if raftServer == nil {
glog.Fatalf("please verify %s is writable, see https://github.com/chrislusf/seaweedfs/issues/717: %s", *masterOption.metaFolder, err)
}