diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-07-23 20:01:43 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-07-23 20:01:43 -0700 |
| commit | 5c14da0f1efbd835e076433c0b7f1a80aebf61c2 (patch) | |
| tree | 9f5fff9c6b4630364e844ab237cea27815d4a8e8 /weed/operation/assign_file_id.go | |
| parent | 4cc2165061bef27c403dc7f0a8f7148e63317588 (diff) | |
| download | seaweedfs-5c14da0f1efbd835e076433c0b7f1a80aebf61c2.tar.xz seaweedfs-5c14da0f1efbd835e076433c0b7f1a80aebf61c2.zip | |
filer.copy: fail early if assign request failed
fix https://github.com/chrislusf/seaweedfs/issues/2216
Diffstat (limited to 'weed/operation/assign_file_id.go')
| -rw-r--r-- | weed/operation/assign_file_id.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/operation/assign_file_id.go b/weed/operation/assign_file_id.go index ffd3e4938..fabc820ff 100644 --- a/weed/operation/assign_file_id.go +++ b/weed/operation/assign_file_id.go @@ -73,6 +73,10 @@ func Assign(masterFn GetMasterFn, grpcDialOption grpc.DialOption, primaryRequest ret.Error = resp.Error ret.Auth = security.EncodedJwt(resp.Auth) + if resp.Error != "" { + return fmt.Errorf("assignRequest: %v", resp.Error) + } + return nil }) |
