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
refactoring: remove unused functions
Chris Lu02710f962449
diff --git a/weed/storage/needle_map.go b/weed/storage/needle_map.goindex 876839be17..77d081ea74 100644--- a/weed/storage/needle_map.go+++ b/weed/storage/needle_map.go@@ -2,7 +2,6 @@ package storageimport ("fmt"- "io/ioutil""os""sync"@@ -31,8 +30,6 @@ type NeedleMapper interface {DeletedCount() intMaxFileKey() NeedleIdIndexFileSize() uint64- IndexFileContent() ([]byte, error)- IndexFileName() string}type baseNeedleMapper struct {@@ -50,10 +47,6 @@ func (nm *baseNeedleMapper) IndexFileSize() uint64 {return 0}-func (nm *baseNeedleMapper) IndexFileName() string {- return nm.indexFile.Name()-}-func (nm *baseNeedleMapper) appendToIndexFile(key NeedleId, offset Offset, size uint32) error {bytes := needle_map.ToBytes(key, offset, size)@@ -66,9 +59,3 @@ func (nm *baseNeedleMapper) appendToIndexFile(key NeedleId, offset Offset, size_, err := nm.indexFile.Write(bytes)return err}--func (nm *baseNeedleMapper) IndexFileContent() ([]byte, error) {- nm.indexFileAccessLock.Lock()- defer nm.indexFileAccessLock.Unlock()- return ioutil.ReadFile(nm.indexFile.Name())-}diff --git a/weed/storage/volume.go b/weed/storage/volume.goindex 9c3f74ca44..301610ab6d 100644--- a/weed/storage/volume.go+++ b/weed/storage/volume.go@@ -140,24 +140,6 @@ func (v *Volume) IndexFileSize() uint64 {return v.nm.IndexFileSize()}-func (v *Volume) IndexFileContent() ([]byte, error) {- v.dataFileAccessLock.Lock()- defer v.dataFileAccessLock.Unlock()- if v.nm == nil {- return nil, nil- }- return v.nm.IndexFileContent()-}--func (v *Volume) IndexFileName() string {- v.dataFileAccessLock.Lock()- defer v.dataFileAccessLock.Unlock()- if v.nm == nil {- return ""- }- return v.nm.IndexFileName()-}-// Close cleanly shuts down this volumefunc (v *Volume) Close() {v.dataFileAccessLock.Lock()