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: file counter should be all files

chrisluc7892bc7c4a5
diff --git a/weed/storage/needle_map_metric.go b/weed/storage/needle_map_metric.go
index 0ce6161319..abf6b4b8ba 100644
--- a/weed/storage/needle_map_metric.go
+++ b/weed/storage/needle_map_metric.go
@@ -105,9 +105,8 @@ func newNeedleMapMetricFromIndexFile(r *os.File) (mm *mapMetric, err error) {
mm.FileByteCounter += uint64(size)
}
- if !bf.TestAndAdd(buf) {
- mm.FileCounter++
- } else {
+ mm.FileCounter++
+ if bf.TestAndAdd(buf) {
// deleted file
mm.DeletionCounter++
if size.IsValid() {