From c2ce97785ff193f3a5a69518bbabf04c05b6efc8 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 22 Jan 2017 21:36:36 -0800 Subject: [PATCH] set the volume size limit fixing https://github.com/chrislusf/seaweedfs/issues/447 --- weed/server/volume_grpc_client.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/weed/server/volume_grpc_client.go b/weed/server/volume_grpc_client.go index ee6f6095c..ecafd5658 100644 --- a/weed/server/volume_grpc_client.go +++ b/weed/server/volume_grpc_client.go @@ -63,8 +63,12 @@ func (vs *VolumeServer) doHeartbeat(sleepInterval time.Duration) error { doneChan <- err return } - vs.store.VolumeSizeLimit = in.GetVolumeSizeLimit() - vs.guard.SecretKey = security.Secret(in.GetSecretKey()) + if in.GetVolumeSizeLimit() != 0 { + vs.store.VolumeSizeLimit = in.GetVolumeSizeLimit() + } + if in.GetSecretKey() != "" { + vs.guard.SecretKey = security.Secret(in.GetSecretKey()) + } if in.GetLeader() != "" && masterNode != in.GetLeader() { vs.masterNodes.SetPossibleLeader(in.GetLeader()) doneChan <- nil