|
|
|
@ -163,6 +163,9 @@ type Config struct {
|
|
|
|
|
// RaftShutdownOnRemove sets whether Raft should be shutdown if the node is removed
|
|
|
|
|
RaftShutdownOnRemove bool
|
|
|
|
|
|
|
|
|
|
// RaftStepdownOnShutdown sets whether Leadership should be relinquished on shutdown
|
|
|
|
|
RaftStepdownOnShutdown bool
|
|
|
|
|
|
|
|
|
|
// RaftNoFreelistSync disables syncing Raft database freelist to disk. When true,
|
|
|
|
|
// it improves the database write performance under normal operation, but requires
|
|
|
|
|
// a full database re-sync during recovery.
|
|
|
|
@ -393,6 +396,7 @@ func ParseFlags(name, desc string, build *BuildInfo) (*Config, error) {
|
|
|
|
|
flag.Uint64Var(&config.RaftSnapThreshold, "raft-snap", 8192, "Number of outstanding log entries that trigger snapshot")
|
|
|
|
|
flag.DurationVar(&config.RaftSnapInterval, "raft-snap-int", 30*time.Second, "Snapshot threshold check interval")
|
|
|
|
|
flag.DurationVar(&config.RaftLeaderLeaseTimeout, "raft-leader-lease-timeout", 0, "Raft leader lease timeout. Use 0s for Raft default")
|
|
|
|
|
flag.BoolVar(&config.RaftStepdownOnShutdown, "raft-shutdown-stepdown", false, "Stepdown as leader before shutting down")
|
|
|
|
|
flag.BoolVar(&config.RaftShutdownOnRemove, "raft-remove-shutdown", false, "Shutdown Raft if node removed")
|
|
|
|
|
flag.BoolVar(&config.RaftNoFreelistSync, "raft-no-freelist-sync", false, "Do not sync Raft log database freelist to disk")
|
|
|
|
|
flag.StringVar(&config.RaftLogLevel, "raft-log-level", "INFO", "Minimum log level for Raft module")
|
|
|
|
|