aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-05-23 00:04:24 -0700
committerChris Lu <chris.lu@gmail.com>2019-05-23 00:04:24 -0700
commite913ee380a88cbc35e8baa6015ceb15971a05d20 (patch)
tree481fba86c6188f42b625d37da5a2f9858e37845c
parent7180520889c57bffcd060820954fd3288a388196 (diff)
downloadseaweedfs-e913ee380a88cbc35e8baa6015ceb15971a05d20.tar.xz
seaweedfs-e913ee380a88cbc35e8baa6015ceb15971a05d20.zip
add comments
-rw-r--r--weed/topology/topology.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/topology/topology.go b/weed/topology/topology.go
index 902e89bd1..e463aae29 100644
--- a/weed/topology/topology.go
+++ b/weed/topology/topology.go
@@ -166,6 +166,7 @@ func (t *Topology) GetOrCreateDataCenter(dcName string) *DataCenter {
}
func (t *Topology) SyncDataNodeRegistration(volumes []*master_pb.VolumeInformationMessage, dn *DataNode) (newVolumes, deletedVolumes []storage.VolumeInfo) {
+ // convert into in memory struct storage.VolumeInfo
var volumeInfos []storage.VolumeInfo
for _, v := range volumes {
if vi, err := storage.NewVolumeInfo(v); err == nil {
@@ -174,6 +175,7 @@ func (t *Topology) SyncDataNodeRegistration(volumes []*master_pb.VolumeInformati
glog.V(0).Infof("Fail to convert joined volume information: %v", err)
}
}
+ // find out the delta volumes
newVolumes, deletedVolumes = dn.UpdateVolumes(volumeInfos)
for _, v := range newVolumes {
t.RegisterVolumeLayout(v, dn)