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:
committed by
GitHub
parent
28a1f42962
commit
4d08393b7c
@@ -26,6 +26,10 @@ func (s3a *S3ApiServer) AdjustedUrl(location *filer_pb.Location) string {
|
||||
return location.Url
|
||||
}
|
||||
|
||||
func (s3a *S3ApiServer) GetDataCenter() string {
|
||||
return s3a.option.DataCenter
|
||||
}
|
||||
|
||||
func writeSuccessResponseXML(w http.ResponseWriter, r *http.Request, response interface{}) {
|
||||
s3err.WriteXMLResponse(w, r, http.StatusOK, response)
|
||||
s3err.PostLog(r, http.StatusOK, s3err.ErrNone)
|
||||
|
||||
@@ -29,6 +29,7 @@ type S3ApiServerOption struct {
|
||||
AllowEmptyFolder bool
|
||||
AllowDeleteBucketNotEmpty bool
|
||||
LocalFilerSocket *string
|
||||
DataCenter string
|
||||
}
|
||||
|
||||
type S3ApiServer struct {
|
||||
|
||||
Reference in New Issue
Block a user