diff options
| author | shibinbin <shibinbin@megvii.com> | 2022-04-07 15:18:28 +0800 |
|---|---|---|
| committer | shibinbin <shibinbin@megvii.com> | 2022-04-07 15:18:28 +0800 |
| commit | c20e1edd99989971a264517d87765700f1cf94e2 (patch) | |
| tree | 544399bb319b745a30c1d1da4270891e35863965 /weed/topology/topology_event_handling.go | |
| parent | 3ab2c0e5c0263de5af35dad91a9107e6038f4203 (diff) | |
| download | seaweedfs-c20e1edd99989971a264517d87765700f1cf94e2.tar.xz seaweedfs-c20e1edd99989971a264517d87765700f1cf94e2.zip | |
fix: master lose some volumes
Diffstat (limited to 'weed/topology/topology_event_handling.go')
| -rw-r--r-- | weed/topology/topology_event_handling.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/topology/topology_event_handling.go b/weed/topology/topology_event_handling.go index 0f1db74df..99acefaf5 100644 --- a/weed/topology/topology_event_handling.go +++ b/weed/topology/topology_event_handling.go @@ -1,6 +1,7 @@ package topology import ( + "github.com/chrislusf/seaweedfs/weed/storage/erasure_coding" "github.com/chrislusf/seaweedfs/weed/storage/types" "google.golang.org/grpc" "math/rand" @@ -84,7 +85,8 @@ func (t *Topology) UnRegisterDataNode(dn *DataNode) { negativeUsages := dn.GetDiskUsages().negative() dn.UpAdjustDiskUsageDelta(negativeUsages) - + dn.DeltaUpdateVolumes([]storage.VolumeInfo{}, dn.GetVolumes()) + dn.DeltaUpdateEcShards([]*erasure_coding.EcVolumeInfo{}, dn.GetEcShards()) if dn.Parent() != nil { dn.Parent().UnlinkChildNode(dn.Id()) } |
