From a95dde77bfd0d8614d93fd8b63f7a93cb0971b98 Mon Sep 17 00:00:00 2001 From: mawei029 Date: Thu, 20 Feb 2025 14:49:14 +0800 Subject: [PATCH] fix(blobnode): delete local disk after it is repaired, fix access DiskNotFound @formatter:off Signed-off-by: mawei029 --- blobstore/blobnode/startup.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blobstore/blobnode/startup.go b/blobstore/blobnode/startup.go index d508833f3..fe5a89424 100644 --- a/blobstore/blobnode/startup.go +++ b/blobstore/blobnode/startup.go @@ -179,7 +179,7 @@ func (s *Service) waitRepairAndClose(ctx context.Context, disk core.DiskAPI) { continue } - if info.Status >= proto.DiskStatusRepairing { + if info.Status >= proto.DiskStatusRepaired { span.Infof("disk:%d path:%s status:%v", diskID, info.Path, info.Status) break } @@ -189,8 +189,8 @@ func (s *Service) waitRepairAndClose(ctx context.Context, disk core.DiskAPI) { config := disk.GetConfig() s.reportOnlineDisk(&config.HostInfo, config.Path) - // after the repair is triggered, the handle can be safely removed - span.Infof("Delete %d from the map table of the service", diskID) + // after the repair is finish, the handle can be safely removed. if delete disk at repairing, access will DiskNotFound + span.Warnf("Delete %d from the map table of the service", diskID) s.lock.Lock() delete(s.Disks, disk.ID())