diff options
| author | chrislu <chris.lu@gmail.com> | 2022-02-01 07:48:28 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-02-01 07:48:28 -0800 |
| commit | 6bee1e9714dace680b19d5a3e8481915e3755ff5 (patch) | |
| tree | ccdf9b6d650a8be1bc624f3d1de4b26cd2f1f2c7 | |
| parent | 7270067289802307556d117be422a1e5a208f558 (diff) | |
| download | seaweedfs-6bee1e9714dace680b19d5a3e8481915e3755ff5.tar.xz seaweedfs-6bee1e9714dace680b19d5a3e8481915e3755ff5.zip | |
[volume.check.disk] fix wrong logic to compare
fix https://github.com/chrislusf/seaweedfs/issues/2626
minuend - subtrahend
| -rw-r--r-- | weed/shell/command_volume_check_disk.go | 4 |
1 files 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 |
