aboutsummaryrefslogtreecommitdiff
path: root/weed/replication/source
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-02-28 16:19:47 -0800
committerChris Lu <chris.lu@gmail.com>2021-02-28 16:19:47 -0800
commit9abb041763f711a34b5049dcfce84033d0dc2171 (patch)
treeab46882e34751aef52cb281ba116793d046b6a41 /weed/replication/source
parent678c54d705e5c29b2fdb580158a4455703b46a0d (diff)
downloadseaweedfs-9abb041763f711a34b5049dcfce84033d0dc2171.tar.xz
seaweedfs-9abb041763f711a34b5049dcfce84033d0dc2171.zip
filer source: support filerProxy mode
Diffstat (limited to 'weed/replication/source')
-rw-r--r--weed/replication/source/filer_source.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/replication/source/filer_source.go b/weed/replication/source/filer_source.go
index 3982360b0..e2e3575dc 100644
--- a/weed/replication/source/filer_source.go
+++ b/weed/replication/source/filer_source.go
@@ -83,8 +83,12 @@ func (fs *FilerSource) LookupFileId(part string) (fileUrls []string, err error)
return nil, fmt.Errorf("LookupFileId locate volume id %s: %v", vid, err)
}
- for _, loc := range locations.Locations {
- fileUrls = append(fileUrls, fmt.Sprintf("http://%s/%s", loc.Url, part))
+ if !fs.proxyByFiler {
+ for _, loc := range locations.Locations {
+ fileUrls = append(fileUrls, fmt.Sprintf("http://%s/%s?readDeleted=true", loc.Url, part))
+ }
+ } else {
+ fileUrls = append(fileUrls, fmt.Sprintf("http://%s/?proxyChunkId=%s", fs.address, part))
}
return