mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 12:27:58 +08:00
add remove volumes with version info
This commit is contained in:
@@ -189,7 +189,6 @@ func (t *Topology) IncrementalSyncDataNodeRegistration(newVolumes, deletedVolume
|
||||
continue
|
||||
}
|
||||
newVis = append(newVis, vi)
|
||||
t.RegisterVolumeLayout(vi, dn)
|
||||
}
|
||||
for _, v := range deletedVolumes {
|
||||
vi, err := storage.NewVolumeInfoFromShort(v)
|
||||
@@ -198,8 +197,15 @@ func (t *Topology) IncrementalSyncDataNodeRegistration(newVolumes, deletedVolume
|
||||
continue
|
||||
}
|
||||
oldVis = append(oldVis, vi)
|
||||
t.UnRegisterVolumeLayout(vi, dn)
|
||||
}
|
||||
dn.DeltaUpdateVolumes(newVis, oldVis)
|
||||
|
||||
for _, vi := range newVis {
|
||||
t.RegisterVolumeLayout(vi, dn)
|
||||
}
|
||||
for _, vi := range oldVis {
|
||||
t.UnRegisterVolumeLayout(vi, dn)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user