Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GetSize and update badger #38

Merged
merged 3 commits into from
Oct 5, 2018
Merged

Implement GetSize and update badger #38

merged 3 commits into from
Oct 5, 2018

Conversation

Stebalien
Copy link
Member

Blocked on ipfs/go-datastore#99.

(and update badger to take advantage of the new ValueSize method)
@ghost ghost assigned Stebalien Oct 4, 2018
@ghost ghost added the status/in-progress In progress label Oct 4, 2018
@Stebalien Stebalien requested review from magik6k and bigs October 4, 2018 23:34
@@ -294,7 +306,7 @@ func (t *txn) Query(q dsq.Query) (dsq.Results, error) {

var result dsq.Result
if !q.KeysOnly {
b, err := item.Value()
b, err := item.ValueCopy(nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The slice is already being copied below.

out := make([]byte, len(val))
copy(out, val)
return out, nil
return item.ValueCopy(nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Stebalien Stebalien merged commit 6ca5b4c into master Oct 5, 2018
@ghost ghost removed the status/in-progress In progress label Oct 5, 2018
@Stebalien Stebalien deleted the feat/get-size branch October 5, 2018 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants