mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-22 20:53:32 +08:00
better logging for volume growth
This commit is contained in:
@@ -93,10 +93,11 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
|
||||
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
|
||||
Option: option,
|
||||
Count: req.WritableVolumeCount,
|
||||
Reason: "grpc assign",
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
glog.V(0).Infof("assign %v %v: %v", req, option.String(), err)
|
||||
glog.V(1).Infof("assign %v %v: %v", req, option.String(), err)
|
||||
stats.MasterPickForWriteErrorCounter.Inc()
|
||||
lastErr = err
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
@@ -128,5 +129,8 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
|
||||
Replicas: replicas,
|
||||
}, nil
|
||||
}
|
||||
if lastErr != nil {
|
||||
glog.V(0).Infof("assign %v %v: %v", req, option.String(), lastErr)
|
||||
}
|
||||
return nil, lastErr
|
||||
}
|
||||
|
@@ -51,6 +51,7 @@ func (ms *MasterServer) ProcessGrowRequest() {
|
||||
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
|
||||
Option: vlc.ToGrowOption(),
|
||||
Count: vl.GetLastGrowCount(),
|
||||
Reason: "collection autogrow",
|
||||
}
|
||||
} else {
|
||||
for _, dc := range dcs {
|
||||
@@ -62,6 +63,7 @@ func (ms *MasterServer) ProcessGrowRequest() {
|
||||
Option: volumeGrowOption,
|
||||
Count: vl.GetLastGrowCount(),
|
||||
Force: true,
|
||||
Reason: "per-dc autogrow",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,6 +110,7 @@ func (ms *MasterServer) ProcessGrowRequest() {
|
||||
|
||||
filter.Store(req, nil)
|
||||
// we have lock called inside vg
|
||||
glog.V(0).Infof("volume grow %+v", req)
|
||||
go func(req *topology.VolumeGrowRequest, vl *topology.VolumeLayout) {
|
||||
ms.DoAutomaticVolumeGrow(req)
|
||||
vl.DoneGrowRequest()
|
||||
|
@@ -151,6 +151,7 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request)
|
||||
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
|
||||
Option: option,
|
||||
Count: uint32(writableVolumeCount),
|
||||
Reason: "http assign",
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user