aboutsummaryrefslogtreecommitdiff
path: root/weed/wdclient/masterclient.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <lebedev_k@tochka.com>2020-11-19 18:16:44 +0500
committerKonstantin Lebedev <lebedev_k@tochka.com>2020-11-19 18:16:44 +0500
commit27e73de7975ff9f097bbfd8d2717aa27931f25b5 (patch)
tree802f8cf0f7cc6834e03a24700a8d07a218f5bd86 /weed/wdclient/masterclient.go
parente1190b3224638616cf4e1318ddcba0b1575f2130 (diff)
parentda04bb3d1bb60d92fdacfb2edd8c8bdba2643038 (diff)
downloadseaweedfs-27e73de7975ff9f097bbfd8d2717aa27931f25b5.tar.xz
seaweedfs-27e73de7975ff9f097bbfd8d2717aa27931f25b5.zip
Merge branch 'upstream_master' into store_s3cred
# Conflicts: # weed/s3api/filer_util.go
Diffstat (limited to 'weed/wdclient/masterclient.go')
-rw-r--r--weed/wdclient/masterclient.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go
index df8c186f2..e39b9dfdf 100644
--- a/weed/wdclient/masterclient.go
+++ b/weed/wdclient/masterclient.go
@@ -24,14 +24,14 @@ type MasterClient struct {
vidMap
}
-func NewMasterClient(grpcDialOption grpc.DialOption, clientType string, clientHost string, clientGrpcPort uint32, masters []string) *MasterClient {
+func NewMasterClient(grpcDialOption grpc.DialOption, clientType string, clientHost string, clientGrpcPort uint32, clientDataCenter string, masters []string) *MasterClient {
return &MasterClient{
clientType: clientType,
clientHost: clientHost,
grpcPort: clientGrpcPort,
masters: masters,
grpcDialOption: grpcDialOption,
- vidMap: newVidMap(),
+ vidMap: newVidMap(clientDataCenter),
}
}
@@ -89,7 +89,7 @@ func (mc *MasterClient) tryAllMasters() {
}
mc.currentMaster = ""
- mc.vidMap = newVidMap()
+ mc.vidMap = newVidMap("")
}
}
@@ -130,8 +130,9 @@ func (mc *MasterClient) tryConnectToMaster(master string) (nextHintedLeader stri
// process new volume location
loc := Location{
- Url: volumeLocation.Url,
- PublicUrl: volumeLocation.PublicUrl,
+ Url: volumeLocation.Url,
+ PublicUrl: volumeLocation.PublicUrl,
+ DataCenter: volumeLocation.DataCenter,
}
for _, newVid := range volumeLocation.NewVids {
glog.V(1).Infof("%s: %s masterClient adds volume %d", mc.clientType, loc.Url, newVid)