better logging for volume growth
This commit is contained in:
@@ -34,7 +34,7 @@ type VolumeGrowRequest struct {
|
||||
}
|
||||
|
||||
func (vg *VolumeGrowRequest) Equals(req *VolumeGrowRequest) bool {
|
||||
return reflect.DeepEqual(existingReq.Option, req.Option) && vg.Count == req.Count
|
||||
return reflect.DeepEqual(vg.Option, req.Option) && vg.Count == req.Count && vg.Force == req.Force
|
||||
}
|
||||
|
||||
type volumeGrowthStrategy struct {
|
||||
|
||||
@@ -301,7 +301,7 @@ func (vl *VolumeLayout) PickForWrite(count uint64, option *VolumeGrowOption) (vi
|
||||
|
||||
lenWriters := len(vl.writables)
|
||||
if lenWriters <= 0 {
|
||||
return 0, 0, nil, true, fmt.Errorf("%s in volume layout", noWritableVolumes)
|
||||
return 0, 0, nil, true, fmt.Errorf("%s", noWritableVolumes)
|
||||
}
|
||||
if option.DataCenter == "" && option.Rack == "" && option.DataNode == "" {
|
||||
vid := vl.writables[rand.Intn(lenWriters)]
|
||||
|
||||
Reference in New Issue
Block a user