Browse Source

filer store: leveldb2 fix nil entry error if not found

pull/1743/head
Chris Lu 4 years ago
parent
commit
361043e6c1
  1. 2
      weed/filer/etcd/etcd_store.go
  2. 2
      weed/filer/leveldb/leveldb_store.go
  3. 2
      weed/filer/leveldb2/leveldb2_store.go

2
weed/filer/etcd/etcd_store.go

@ -101,7 +101,7 @@ func (store *EtcdStore) FindEntry(ctx context.Context, fullpath weed_util.FullPa
resp, err := store.client.Get(ctx, string(key))
if err != nil {
return nil, fmt.Errorf("get %s : %v", entry.FullPath, err)
return nil, fmt.Errorf("get %s : %v", fullpath, err)
}
if len(resp.Kvs) == 0 {

2
weed/filer/leveldb/leveldb_store.go

@ -107,7 +107,7 @@ func (store *LevelDBStore) FindEntry(ctx context.Context, fullpath weed_util.Ful
return nil, filer_pb.ErrNotFound
}
if err != nil {
return nil, fmt.Errorf("get %s : %v", entry.FullPath, err)
return nil, fmt.Errorf("get %s : %v", fullpath, err)
}
entry = &filer.Entry{

2
weed/filer/leveldb2/leveldb2_store.go

@ -115,7 +115,7 @@ func (store *LevelDB2Store) FindEntry(ctx context.Context, fullpath weed_util.Fu
return nil, filer_pb.ErrNotFound
}
if err != nil {
return nil, fmt.Errorf("get %s : %v", entry.FullPath, err)
return nil, fmt.Errorf("get %s : %v", fullpath, err)
}
entry = &filer.Entry{

Loading…
Cancel
Save