This commit is contained in:
chrislu 2024-08-30 14:51:55 -07:00
parent 22d5d2ea96
commit 8679870008
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ func (ms *MasterServer) ProcessGrowRequest() {
if !ms.Topo.IsLeader() { if !ms.Topo.IsLeader() {
continue continue
} }
for _, vl := range ms.Topo.ListVolumeLyauts() { for _, vl := range ms.Topo.ListVolumeLayouts() {
if !vl.HasGrowRequest() && vl.ShouldGrowVolumes(&topology.VolumeGrowOption{}) { if !vl.HasGrowRequest() && vl.ShouldGrowVolumes(&topology.VolumeGrowOption{}) {
vl.AddGrowRequest() vl.AddGrowRequest()
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{ ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{

View File

@ -42,7 +42,7 @@ func (t *Topology) ToInfo() (info TopologyInfo) {
return return
} }
func (t *Topology) ListVolumeLyauts() (volumeLayouts []*VolumeLayout) { func (t *Topology) ListVolumeLayouts() (volumeLayouts []*VolumeLayout) {
for _, col := range t.collectionMap.Items() { for _, col := range t.collectionMap.Items() {
for _, volumeLayout := range col.(*Collection).storageType2VolumeLayout.Items() { for _, volumeLayout := range col.(*Collection).storageType2VolumeLayout.Items() {
volumeLayouts = append(volumeLayouts, volumeLayout.(*VolumeLayout)) volumeLayouts = append(volumeLayouts, volumeLayout.(*VolumeLayout))