mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
logging PickForWrite error
https://github.com/seaweedfs/seaweedfs/issues/3886
This commit is contained in:
parent
fe3e7db9d1
commit
dd78397fea
|
@ -90,7 +90,12 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
|
||||||
|
|
||||||
for time.Now().Sub(startTime) < maxTimeout {
|
for time.Now().Sub(startTime) < maxTimeout {
|
||||||
fid, count, dnList, err := ms.Topo.PickForWrite(req.Count, option)
|
fid, count, dnList, err := ms.Topo.PickForWrite(req.Count, option)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
|
glog.Warningf("PickForWrite error: %+v", err)
|
||||||
|
lastErr = err
|
||||||
|
time.Sleep(200 * time.Millisecond)
|
||||||
|
continue
|
||||||
|
}
|
||||||
dn := dnList.Head()
|
dn := dnList.Head()
|
||||||
var replicas []*master_pb.Location
|
var replicas []*master_pb.Location
|
||||||
for _, r := range dnList.Rest() {
|
for _, r := range dnList.Rest() {
|
||||||
|
@ -114,9 +119,5 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
|
||||||
Replicas: replicas,
|
Replicas: replicas,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
//glog.V(4).Infoln("waiting for volume growing...")
|
|
||||||
lastErr = err
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
}
|
|
||||||
return nil, lastErr
|
return nil, lastErr
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue