From 34165013c85cb39385e422710f12eb1bde40109a Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Fri, 21 Jun 2024 03:24:31 +0500 Subject: [PATCH 1/2] chore: hot fix panic fs.verify (#5696) --- weed/shell/command_fs_verify.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/weed/shell/command_fs_verify.go b/weed/shell/command_fs_verify.go index b30020c40..47052cca0 100644 --- a/weed/shell/command_fs_verify.go +++ b/weed/shell/command_fs_verify.go @@ -163,9 +163,10 @@ func (c *commandFsVerify) verifyProcessMetadata(path string, wg *sync.WaitGroup) Directory: message.NewParentPath, Name: message.NewEntry.Name, }) - if strings.HasSuffix(errReq.Error(), "no entry is found in filer store") { - return nil - } else if errReq != nil { + if errReq != nil { + if strings.HasSuffix(errReq.Error(), "no entry is found in filer store") { + return nil + } return errReq } if entryResp.Entry.Attributes.Mtime == message.NewEntry.Attributes.Mtime && From 73baf82f056a2ace5a52a7a76113656213c1e2cf Mon Sep 17 00:00:00 2001 From: Numblgw <44025291+Numblgw@users.noreply.github.com> Date: Fri, 21 Jun 2024 06:29:36 +0800 Subject: [PATCH 2/2] bugfix: unregister ec shards when volume server disconnected (#5697) bugfix unregister ec shards when volume server disconnected Co-authored-by: liguowei --- weed/topology/topology_event_handling.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weed/topology/topology_event_handling.go b/weed/topology/topology_event_handling.go index 761649ff4..d0ecd089a 100644 --- a/weed/topology/topology_event_handling.go +++ b/weed/topology/topology_event_handling.go @@ -90,6 +90,11 @@ func (t *Topology) UnRegisterDataNode(dn *DataNode) { vl.SetVolumeUnavailable(dn, v.Id) } + // unregister ec shards when volume server disconnected + for _, s := range dn.GetEcShards() { + t.UnRegisterEcShards(s, dn) + } + negativeUsages := dn.GetDiskUsages().negative() dn.UpAdjustDiskUsageDelta(negativeUsages) dn.DeltaUpdateVolumes([]storage.VolumeInfo{}, dn.GetVolumes())