diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2020-04-01 16:48:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-01 16:48:58 -0700 |
| commit | c446438ca5360b8e479e77dd0da32a80bd5644d6 (patch) | |
| tree | 9f984e23068124d2e37f465728fe82426f50c9aa /weed/server | |
| parent | d61bb60450e8fabc5c5961874fe2e69afa0200ec (diff) | |
| parent | eae3f27c8021ef1903419de43c68d2dc62a09953 (diff) | |
| download | seaweedfs-c446438ca5360b8e479e77dd0da32a80bd5644d6.tar.xz seaweedfs-c446438ca5360b8e479e77dd0da32a80bd5644d6.zip | |
Merge pull request #1255 from levenlabs/ignore
Added treat_replication_as_minimums master toml option
Diffstat (limited to 'weed/server')
| -rw-r--r-- | weed/server/master_server.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/server/master_server.go b/weed/server/master_server.go index a9ae6b888..497990f29 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -77,6 +77,9 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers []string) *Maste v.SetDefault("jwt.signing.read.expires_after_seconds", 60) readExpiresAfterSec := v.GetInt("jwt.signing.read.expires_after_seconds") + v.SetDefault("master.replication.treat_replication_as_minimums", false) + replicationAsMin := v.GetBool("master.replication.treat_replication_as_minimums") + var preallocateSize int64 if option.VolumePreallocate { preallocateSize = int64(option.VolumeSizeLimitMB) * (1 << 20) @@ -96,7 +99,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers []string) *Maste if nil == seq { glog.Fatalf("create sequencer failed.") } - ms.Topo = topology.NewTopology("topo", seq, uint64(ms.option.VolumeSizeLimitMB)*1024*1024, ms.option.PulseSeconds) + ms.Topo = topology.NewTopology("topo", seq, uint64(ms.option.VolumeSizeLimitMB)*1024*1024, ms.option.PulseSeconds, replicationAsMin) ms.vg = topology.NewDefaultVolumeGrowth() glog.V(0).Infoln("Volume Size Limit is", ms.option.VolumeSizeLimitMB, "MB") |
