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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Add InMemory to Volume Grow structure
j.laycockcbd0a98fa12c
diff --git a/weed/pb/volume_server_pb/volume_server.pb.go b/weed/pb/volume_server_pb/volume_server.pb.goindex 02aa789896..897ad7fbbc 100644--- a/weed/pb/volume_server_pb/volume_server.pb.go+++ b/weed/pb/volume_server_pb/volume_server.pb.go@@ -214,7 +214,6 @@ func (m *VacuumVolumeCheckResponse) GetGarbageRatio() float64 {type VacuumVolumeCompactRequest struct {VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`Preallocate int64 `protobuf:"varint,2,opt,name=preallocate" json:"preallocate,omitempty"`- InMemory bool `protobuf:"varint,2,opt,name=inmemory" json:"inmemory,omitempty"`}func (m *VacuumVolumeCompactRequest) Reset() { *m = VacuumVolumeCompactRequest{} }@@ -236,13 +235,6 @@ func (m *VacuumVolumeCompactRequest) GetPreallocate() int64 {return 0}-func (m *VacuumVolumeCompactRequest) GetInMemory() bool {- if m != nil {- return m.InMemory- }- return false-}-type VacuumVolumeCompactResponse struct {}diff --git a/weed/server/volume_grpc_admin.go b/weed/server/volume_grpc_admin.goindex 93d8c47091..f52f9fd2d8 100644--- a/weed/server/volume_grpc_admin.go+++ b/weed/server/volume_grpc_admin.go@@ -35,7 +35,7 @@ func (vs *VolumeServer) AllocateVolume(ctx context.Context, req *volume_server_preq.Replication,req.Ttl,req.Preallocate,- req.GetInMemory(),+ req.InMemory,)if err != nil {diff --git a/weed/storage/store.go b/weed/storage/store.goindex 5f55db31e8..89b92f229d 100644--- a/weed/storage/store.go+++ b/weed/storage/store.go@@ -59,7 +59,7 @@ func NewStore(grpcDialOption grpc.DialOption, port int, ip, publicUrl string, direturn}-func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, in_memory bool) error {+func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64, memoryMapped bool) error {rt, e := NewReplicaPlacementFromString(replicaPlacement)if e != nil {return e@@ -68,7 +68,7 @@ func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapif e != nil {return e}- e = s.addVolume(volumeId, collection, needleMapKind, rt, ttl, preallocate, in_memory)+ e = s.addVolume(volumeId, collection, needleMapKind, rt, ttl, preallocate, memoryMapped)return e}func (s *Store) DeleteCollection(collection string) (e error) {diff --git a/weed/topology/allocate_volume.go b/weed/topology/allocate_volume.goindex 69d1069644..91a67681a7 100644--- a/weed/topology/allocate_volume.go+++ b/weed/topology/allocate_volume.go@@ -23,6 +23,7 @@ func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.VolReplication: option.ReplicaPlacement.String(),Ttl: option.Ttl.String(),Preallocate: option.Prealloacte,+ InMemory: option.InMemory,})return deleteErr})diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.goindex adbdd6b27b..b9b2b69f7d 100644--- a/weed/topology/volume_growth.go+++ b/weed/topology/volume_growth.go@@ -28,6 +28,7 @@ type VolumeGrowOption struct {DataCenter stringRack stringDataNode string+ InMemory bool}type VolumeGrowth struct {