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.

refactor

Chris Luec5a30562432
diff --git a/weed/storage/needle/compact_map.go b/weed/storage/needle/compact_map.go
index 63781f6a2f..39f80e4d17 100644
--- a/weed/storage/needle/compact_map.go
+++ b/weed/storage/needle/compact_map.go
@@ -5,6 +5,10 @@ import (
"sync"
)
+const (
+ batch = 100000
+)
+
type CompactSection struct {
sync.RWMutex
values []NeedleValue
diff --git a/weed/storage/needle/needle_value.go b/weed/storage/needle/needle_value.go
index b15d25245a..96ee830091 100644
--- a/weed/storage/needle/needle_value.go
+++ b/weed/storage/needle/needle_value.go
@@ -5,10 +5,6 @@ import (
"github.com/google/btree"
)
-const (
- batch = 100000
-)
-
type NeedleValue struct {
Key NeedleId
Offset Offset `comment:"Volume offset"` //since aligned to 8 bytes, range is 4G*8=32G