better logging for volume growth

This commit is contained in:
chrislu
2024-09-07 12:38:34 -07:00
parent accba3070a
commit ff3d46637d
5 changed files with 11 additions and 3 deletions

View File

@@ -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
}