Browse Source

calculate disk usage in case of race condition

related to https://github.com/chrislusf/seaweedfs/issues/2357
pull/2380/head
Chris Lu 3 years ago
parent
commit
8a66306064
  1. 3
      weed/topology/data_node.go

3
weed/topology/data_node.go

@ -110,6 +110,9 @@ func (dn *DataNode) DeltaUpdateVolumes(newVolumes, deletedVolumes []storage.Volu
for _, v := range deletedVolumes {
disk := dn.getOrCreateDisk(v.DiskType)
if _, found := disk.volumes[v.Id]; !found {
continue
}
delete(disk.volumes, v.Id)
deltaDiskUsages := newDiskUsages()

Loading…
Cancel
Save