fix race detector found problems

This commit is contained in:
Chris Lu
2019-04-14 23:00:37 -07:00
parent 26aaccca08
commit 3e8a3a8fec
4 changed files with 62 additions and 42 deletions

View File

@@ -2,10 +2,11 @@ package weed_server
import (
"fmt"
"time"
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/spf13/viper"
"google.golang.org/grpc"
"time"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
@@ -75,7 +76,7 @@ func (vs *VolumeServer) doHeartbeat(ctx context.Context, masterNode, masterGrpcA
return
}
if in.GetVolumeSizeLimit() != 0 {
vs.store.VolumeSizeLimit = in.GetVolumeSizeLimit()
vs.store.SetVolumeSizeLimit(in.GetVolumeSizeLimit())
}
if in.GetLeader() != "" && masterNode != in.GetLeader() {
glog.V(0).Infof("Volume Server found a new master newLeader: %v instead of %v", in.GetLeader(), masterNode)