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
leveldb3: ensure repeatable adding removing buckets
Chris Luca730134538e
diff --git a/weed/filer/leveldb3/leveldb3_store.go b/weed/filer/leveldb3/leveldb3_store.goindex a582235f4a..332f1569b2 100644--- a/weed/filer/leveldb3/leveldb3_store.go+++ b/weed/filer/leveldb3/leveldb3_store.go@@ -137,6 +137,18 @@ func (store *LevelDB3Store) findDB(fullpath weed_util.FullPath, isForChildren boreturn db, bucket, shortPath, nil}+func (store *LevelDB3Store) closeDB(bucket string) {++ store.dbsLock.Lock()+ defer store.dbsLock.Unlock()++ if db, found := store.dbs[bucket]; found {+ db.Close()+ delete(store.dbs, bucket)+ }++}+func (store *LevelDB3Store) BeginTransaction(ctx context.Context) (context.Context, error) {return ctx, nil}@@ -240,7 +252,7 @@ func (store *LevelDB3Store) DeleteFolderChildren(ctx context.Context, fullpath w}if bucket != DEFAULT && shortPath == "/" {- db.Close()+ store.closeDB(bucket)if bucket != "" { // just to make sureos.RemoveAll(store.dir + "/" + bucket)}