Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

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

chrislu6bee1e9714da
diff --git a/weed/shell/command_volume_check_disk.go b/weed/shell/command_volume_check_disk.go
index 3a51cdcce0..a107574a83 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