mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Fix nil pointer exception
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
This commit is contained in:
parent
ea7643f8bf
commit
6f5770bf65
1 changed files with 2 additions and 3 deletions
|
|
@ -506,12 +506,11 @@ func (e *Etcd) Schema(ctx context.Context) (disco.Schema, error) {
|
|||
}
|
||||
|
||||
func (e *Etcd) Metadata(ctx context.Context, peerID string) ([]byte, error) {
|
||||
kv := e.e.Server.KV()
|
||||
resp, err := kv.Range([]byte(path.Join(metadataPrefix, peerID)), nil, mvcc.RangeOptions{})
|
||||
resp, err := e.cli.KV.Get(ctx, path.Join(metadataPrefix, peerID))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
kvs := resp.KVs
|
||||
kvs := resp.Kvs
|
||||
|
||||
if len(kvs) > 1 {
|
||||
return nil, disco.ErrTooManyResults
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue