Skip to content

Commit

Permalink
kv: fix typo in bloom filter init; fix #675
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Jan 5, 2018
1 parent ac6e1df commit 3adb786
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion graph/kv/indexing.go
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ func (qs *QuadStore) initBloomFilter(ctx context.Context) error {
it := b.Scan(nil)
defer it.Close()
for it.Next(ctx) {
v := it.Key()
v := it.Val()
p = proto.Primitive{}
err := p.Unmarshal(v)
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion graph/kv/quadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ func New(kv BucketKV, _ graph.Options) (graph.QuadStore, error) {
return nil, errors.New("kv: data version is out of date. Run cayleyupgrade for your config to update the data.")
}
qs.valueLRU = lru.New(2000)
qs.initBloomFilter(ctx)
if err := qs.initBloomFilter(ctx); err != nil {
return nil, err
}
return qs, nil
}

Expand Down

0 comments on commit 3adb786

Please sign in to comment.