mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
calculate disk usage in case of race condition
related to https://github.com/chrislusf/seaweedfs/issues/2357
This commit is contained in:
parent
4ed2994555
commit
8a66306064
|
@ -110,6 +110,9 @@ func (dn *DataNode) DeltaUpdateVolumes(newVolumes, deletedVolumes []storage.Volu
|
||||||
|
|
||||||
for _, v := range deletedVolumes {
|
for _, v := range deletedVolumes {
|
||||||
disk := dn.getOrCreateDisk(v.DiskType)
|
disk := dn.getOrCreateDisk(v.DiskType)
|
||||||
|
if _, found := disk.volumes[v.Id]; !found {
|
||||||
|
continue
|
||||||
|
}
|
||||||
delete(disk.volumes, v.Id)
|
delete(disk.volumes, v.Id)
|
||||||
|
|
||||||
deltaDiskUsages := newDiskUsages()
|
deltaDiskUsages := newDiskUsages()
|
||||||
|
|
Loading…
Reference in a new issue