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
cassandra: do not mask KvGet backend errors as not-found (#10361)
Chris Luefdfeaba44fd
diff --git a/weed/filer/cassandra/cassandra_store_kv.go b/weed/filer/cassandra/cassandra_store_kv.goindex a3023e1638..bdce1f78b3 100644--- a/weed/filer/cassandra/cassandra_store_kv.go+++ b/weed/filer/cassandra/cassandra_store_kv.go@@ -3,6 +3,7 @@ package cassandraimport ("context""encoding/base64"+ "errors""fmt"gocql "github.com/apache/cassandra-gocql-driver/v2"@@ -27,9 +28,10 @@ func (store *CassandraStore) KvGet(ctx context.Context, key []byte) (data []byteif err := store.session.Query("SELECT meta FROM filemeta WHERE directory=? AND name=?",dir, name).Scan(&data); err != nil {- if err != gocql.ErrNotFound {+ if errors.Is(err, gocql.ErrNotFound) {return nil, filer.ErrKvNotFound}+ return nil, fmt.Errorf("kv get: %w", err)}if len(data) == 0 {diff --git a/weed/filer/cassandra2/cassandra_store_kv.go b/weed/filer/cassandra2/cassandra_store_kv.goindex 31b3511606..d97235fd97 100644--- a/weed/filer/cassandra2/cassandra_store_kv.go+++ b/weed/filer/cassandra2/cassandra_store_kv.go@@ -3,6 +3,7 @@ package cassandra2import ("context""encoding/base64"+ "errors""fmt"gocql "github.com/apache/cassandra-gocql-driver/v2"@@ -28,9 +29,10 @@ func (store *Cassandra2Store) KvGet(ctx context.Context, key []byte) (data []bytif err := store.session.Query("SELECT meta FROM filemeta WHERE dirhash=? AND directory=? AND name=?",util.HashStringToLong(dir), dir, name).Scan(&data); err != nil {- if err != gocql.ErrNotFound {+ if errors.Is(err, gocql.ErrNotFound) {return nil, filer.ErrKvNotFound}+ return nil, fmt.Errorf("kv get: %w", err)}if len(data) == 0 {