diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-02-13 13:50:14 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-02-13 13:50:14 -0800 |
| commit | 4bd8a692d80801f3864cf9ce4325908529a0f6ef (patch) | |
| tree | 14ecca5d79494628a41e8cf304aa395bb47948fe /weed/topology/topology.go | |
| parent | 712b3e9e53e116f58399fe30cd7038b234a5832b (diff) | |
| download | seaweedfs-4bd8a692d80801f3864cf9ce4325908529a0f6ef.tar.xz seaweedfs-4bd8a692d80801f3864cf9ce4325908529a0f6ef.zip | |
disk type can be generic tags
Diffstat (limited to 'weed/topology/topology.go')
| -rw-r--r-- | weed/topology/topology.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/topology/topology.go b/weed/topology/topology.go index 486394f7a..220be4e88 100644 --- a/weed/topology/topology.go +++ b/weed/topology/topology.go @@ -188,14 +188,14 @@ func (t *Topology) DeleteLayout(collectionName string, rp *super_block.ReplicaPl } func (t *Topology) RegisterVolumeLayout(v storage.VolumeInfo, dn *DataNode) { - diskType, _ := storage.ToDiskType(v.DiskType) + diskType := storage.ToDiskType(v.DiskType) vl := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, diskType) vl.RegisterVolume(&v, dn) vl.EnsureCorrectWritables(&v) } func (t *Topology) UnRegisterVolumeLayout(v storage.VolumeInfo, dn *DataNode) { glog.Infof("removing volume info: %+v", v) - diskType, _ := storage.ToDiskType(v.DiskType) + diskType := storage.ToDiskType(v.DiskType) volumeLayout := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, diskType) volumeLayout.UnRegisterVolume(&v, dn) if volumeLayout.isEmpty() { @@ -235,7 +235,7 @@ func (t *Topology) SyncDataNodeRegistration(volumes []*master_pb.VolumeInformati t.UnRegisterVolumeLayout(v, dn) } for _, v := range changedVolumes { - diskType, _ := storage.ToDiskType(v.DiskType) + diskType := storage.ToDiskType(v.DiskType) vl := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, diskType) vl.EnsureCorrectWritables(&v) } |
