From 6bee1e9714dace680b19d5a3e8481915e3755ff5 Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 1 Feb 2022 07:48:28 -0800 Subject: [PATCH] [volume.check.disk] fix wrong logic to compare fix https://github.com/chrislusf/seaweedfs/issues/2626 minuend - subtrahend --- weed/shell/command_volume_check_disk.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/shell/command_volume_check_disk.go b/weed/shell/command_volume_check_disk.go index 3a51cdcce..a107574a8 100644 --- a/weed/shell/command_volume_check_disk.go +++ b/weed/shell/command_volume_check_disk.go @@ -138,9 +138,9 @@ func (c *commandVolumeCheckDisk) doVolumeCheckDisk(minuend, subtrahend *needle_m // hash join, can be more efficient var missingNeedles []needle_map.NeedleValue var counter int - subtrahend.AscendingVisit(func(value needle_map.NeedleValue) error { + minuend.AscendingVisit(func(value needle_map.NeedleValue) error { counter++ - if _, found := minuend.Get(value.Key); !found { + if _, found := subtrahend.Get(value.Key); !found { missingNeedles = append(missingNeedles, value) } return nil