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
only set lookup cache when successful
Chris Lua437d774313a
diff --git a/go/operation/lookup.go b/go/operation/lookup.goindex 2eea1ab347..f191bfdbf4 100644--- a/go/operation/lookup.go+++ b/go/operation/lookup.go@@ -28,8 +28,9 @@ var (func Lookup(server string, vid string) (ret *LookupResult, err error) {locations, cache_err := vc.Get(vid)if cache_err != nil {- ret, err = do_lookup(server, vid)- vc.Set(vid, ret.Locations, 1*time.Minute)+ if ret, err = do_lookup(server, vid); err == nil {+ vc.Set(vid, ret.Locations, 1*time.Minute)+ }} else {ret = &LookupResult{VolumeId: vid, Locations: locations}}