diff options
| author | garenchan <garenchan23@gmail.com> | 2022-02-12 18:19:49 +0800 |
|---|---|---|
| committer | garenchan <garenchan23@gmail.com> | 2022-02-14 21:09:07 +0800 |
| commit | bd032eabe7def055e617440513546819b5b3d88c (patch) | |
| tree | 33d3e01fa4ee1f2543095bea1622e1b9f5a706ba /weed/command/server.go | |
| parent | 0c1f42f4eba8b00c6599dfec52413a18e25fea2e (diff) | |
| download | seaweedfs-bd032eabe7def055e617440513546819b5b3d88c.tar.xz seaweedfs-bd032eabe7def055e617440513546819b5b3d88c.zip | |
[UPDATE] Make heartbeat interval and election timeout of masters configurable.
Diffstat (limited to 'weed/command/server.go')
| -rw-r--r-- | weed/command/server.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/command/server.go b/weed/command/server.go index 01c59fb85..3a58c4305 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -98,6 +98,8 @@ func init() { masterOptions.metricsAddress = cmdServer.Flag.String("metrics.address", "", "Prometheus gateway address") masterOptions.metricsIntervalSec = cmdServer.Flag.Int("metrics.intervalSeconds", 15, "Prometheus push interval in seconds") masterOptions.raftResumeState = cmdServer.Flag.Bool("resumeState", false, "resume previous state on start master server") + masterOptions.heartbeatInterval = cmdServer.Flag.Duration("master.heartbeatInterval", 300*time.Millisecond, "heartbeat interval of master servers, and will be randomly multiplied by [1, 1.25)") + masterOptions.electionTimeout = cmdServer.Flag.Duration("master.electionTimeout", 10*time.Second, "election timeout of master servers") filerOptions.collection = cmdServer.Flag.String("filer.collection", "", "all data will be stored in this collection") filerOptions.port = cmdServer.Flag.Int("filer.port", 8888, "filer server http listen port") |
