mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
add comments
This commit is contained in:
parent
7180520889
commit
e913ee380a
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue