filer prefer volume server in same data center (#3405)

* initial prefer same data center
https://github.com/seaweedfs/seaweedfs/issues/3404

* GetDataCenter

* prefer same data center for ReplicationSource

* GetDataCenterId

* remove glog
This commit is contained in:
Konstantin Lebedev
2022-08-05 05:35:00 +05:00
committed by GitHub
parent 28a1f42962
commit 4d08393b7c
36 changed files with 925 additions and 795 deletions

View File

@@ -49,8 +49,8 @@ func Post(url string, values url.Values) ([]byte, error) {
return b, nil
}
// github.com/seaweedfs/seaweedfs/unmaintained/repeated_vacuum/repeated_vacuum.go
// may need increasing http.Client.Timeout
// github.com/seaweedfs/seaweedfs/unmaintained/repeated_vacuum/repeated_vacuum.go
// may need increasing http.Client.Timeout
func Get(url string) ([]byte, bool, error) {
request, err := http.NewRequest("GET", url, nil)
@@ -288,7 +288,6 @@ func ReadUrl(fileUrl string, cipherKey []byte, isContentCompressed bool, isFullC
}
func ReadUrlAsStream(fileUrl string, cipherKey []byte, isContentGzipped bool, isFullChunk bool, offset int64, size int, fn func(data []byte)) (retryable bool, err error) {
if cipherKey != nil {
return readEncryptedUrl(fileUrl, cipherKey, isContentGzipped, isFullChunk, offset, size, fn)
}