diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-07-15 15:29:15 +0500 |
|---|---|---|
| committer | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-07-15 15:29:15 +0500 |
| commit | 01996bccf8ca8cc285e95b55633a501516668a6f (patch) | |
| tree | 06746410eb9081cf98182d983688436a89e3267f /weed/filer/stream.go | |
| parent | 1db012485f996df0615a1d6a7ece9faace2e536c (diff) | |
| download | seaweedfs-01996bccf8ca8cc285e95b55633a501516668a6f.tar.xz seaweedfs-01996bccf8ca8cc285e95b55633a501516668a6f.zip | |
Use fallback if urls are not found
Diffstat (limited to 'weed/filer/stream.go')
| -rw-r--r-- | weed/filer/stream.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filer/stream.go b/weed/filer/stream.go index 7da9fd0a0..71808017e 100644 --- a/weed/filer/stream.go +++ b/weed/filer/stream.go @@ -69,14 +69,14 @@ func StreamContent(masterClient wdclient.HasLookupFileIdFunction, writer io.Writ fileId2Url := make(map[string][]string) for _, chunkView := range chunkViews { - urlStrings, err := masterClient.GetLookupFileIdFunction()(chunkView.FileId) if err != nil { glog.V(1).Infof("operation LookupFileId %s failed, err: %v", chunkView.FileId, err) return err } else if len(urlStrings) == 0 { - glog.Errorf("operation LookupFileId %s failed, err: urls not found", chunkView.FileId) - return fmt.Errorf("operation LookupFileId %s failed, err: urls not found", chunkView.FileId) + errUrlNotFound := fmt.Errorf("operation LookupFileId %s failed, err: urls not found", chunkView.FileId) + glog.Error(errUrlNotFound) + return errUrlNotFound } fileId2Url[chunkView.FileId] = urlStrings } |
