mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
filer.copy: fail early if assign request failed
fix https://github.com/chrislusf/seaweedfs/issues/2216
This commit is contained in:
parent
4cc2165061
commit
5c14da0f1e
|
@ -381,6 +381,9 @@ func (worker *FileCopyWorker) uploadFileAsOne(task FileCopyTask, f *os.File) err
|
||||||
if assignResult.Error != "" {
|
if assignResult.Error != "" {
|
||||||
return fmt.Errorf("assign volume failure %v: %v", request, assignResult.Error)
|
return fmt.Errorf("assign volume failure %v: %v", request, assignResult.Error)
|
||||||
}
|
}
|
||||||
|
if assignResult.Url == "" {
|
||||||
|
return fmt.Errorf("assign volume failure %v: %v", request, assignResult)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -73,6 +73,10 @@ func Assign(masterFn GetMasterFn, grpcDialOption grpc.DialOption, primaryRequest
|
||||||
ret.Error = resp.Error
|
ret.Error = resp.Error
|
||||||
ret.Auth = security.EncodedJwt(resp.Auth)
|
ret.Auth = security.EncodedJwt(resp.Auth)
|
||||||
|
|
||||||
|
if resp.Error != "" {
|
||||||
|
return fmt.Errorf("assignRequest: %v", resp.Error)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue