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
fix compilation error
Chris Lu1c2e920fa283
diff --git a/go.mod b/go.modindex 15d7a3759d..e408618f3a 100644--- a/go.mod+++ b/go.mod@@ -25,7 +25,7 @@ require (github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirectgithub.com/frankban/quicktest v1.7.2 // indirectgithub.com/gabriel-vasile/mimetype v1.0.0- github.com/go-redis/redis v6.15.2+incompatible+ github.com/go-redis/redis v6.15.7+incompatiblegithub.com/go-sql-driver/mysql v1.4.1github.com/gocql/gocql v0.0.0-20190829130954-e163eff7a8c6github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48 // indirectdiff --git a/go.sum b/go.sumindex 5c1d52afd3..fff96e5f65 100644--- a/go.sum+++ b/go.sum@@ -131,6 +131,8 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4=github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=+github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U=+github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=diff --git a/weed/filer2/redis2/universal_redis_store.go b/weed/filer2/redis2/universal_redis_store.goindex 457ab50c6c..420336b463 100644--- a/weed/filer2/redis2/universal_redis_store.go+++ b/weed/filer2/redis2/universal_redis_store.go@@ -38,16 +38,13 @@ func (store *UniversalRedis2Store) InsertEntry(ctx context.Context, entry *filerreturn fmt.Errorf("encoding %s %+v: %v", entry.FullPath, entry.Attr, err)}- _, err = store.Client.Set(string(entry.FullPath), value, time.Duration(entry.TtlSec)*time.Second).Result()-- if err != nil {+ if err = store.Client.Set(string(entry.FullPath), value, time.Duration(entry.TtlSec)*time.Second).Err(); err != nil {return fmt.Errorf("persisting %s : %v", entry.FullPath, err)}dir, name := entry.FullPath.DirAndName()if name != "" {- _, err = store.Client.ZAdd(genDirectoryListKey(dir), &redis.Z{Score: 0, Member: name}).Result()- if err != nil {+ if err = store.Client.ZAddNX(genDirectoryListKey(dir), redis.Z{Score: 0, Member: name}).Err(); err != nil {return fmt.Errorf("persisting %s in parent dir: %v", entry.FullPath, err)}}