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

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

minuend - subtrahend
This commit is contained in:
chrislu 2022-02-01 07:48:28 -08:00
parent 7270067289
commit 6bee1e9714

View file

@ -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