Browse Source

[volume.check.disk] fix wrong logic to compare

fix https://github.com/chrislusf/seaweedfs/issues/2626

minuend - subtrahend
pull/2631/head
chrislu 3 years ago
parent
commit
6bee1e9714
  1. 4
      weed/shell/command_volume_check_disk.go

4
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 // hash join, can be more efficient
var missingNeedles []needle_map.NeedleValue var missingNeedles []needle_map.NeedleValue
var counter int var counter int
subtrahend.AscendingVisit(func(value needle_map.NeedleValue) error {
minuend.AscendingVisit(func(value needle_map.NeedleValue) error {
counter++ counter++
if _, found := minuend.Get(value.Key); !found {
if _, found := subtrahend.Get(value.Key); !found {
missingNeedles = append(missingNeedles, value) missingNeedles = append(missingNeedles, value)
} }
return nil return nil

Loading…
Cancel
Save