Aleksey Kosov
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
5 deletions
-
weed/filer/cassandra/cassandra_store.go
|
@ -2,6 +2,7 @@ package cassandra |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"context" |
|
|
"context" |
|
|
|
|
|
"errors" |
|
|
"fmt" |
|
|
"fmt" |
|
|
"github.com/gocql/gocql" |
|
|
"github.com/gocql/gocql" |
|
|
"time" |
|
|
"time" |
|
@ -129,13 +130,10 @@ func (store *CassandraStore) FindEntry(ctx context.Context, fullpath util.FullPa |
|
|
if err := store.session.Query( |
|
|
if err := store.session.Query( |
|
|
"SELECT meta FROM filemeta WHERE directory=? AND name=?", |
|
|
"SELECT meta FROM filemeta WHERE directory=? AND name=?", |
|
|
dir, name).Scan(&data); err != nil { |
|
|
dir, name).Scan(&data); err != nil { |
|
|
if err != gocql.ErrNotFound { |
|
|
|
|
|
|
|
|
if errors.Is(err, gocql.ErrNotFound) { |
|
|
return nil, filer_pb.ErrNotFound |
|
|
return nil, filer_pb.ErrNotFound |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if len(data) == 0 { |
|
|
|
|
|
return nil, filer_pb.ErrNotFound |
|
|
|
|
|
|
|
|
return nil, err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
entry = &filer.Entry{ |
|
|
entry = &filer.Entry{ |
|
|