Skip to content
New issue

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

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

Already on GitHub? # to your account

add a GetSize method #99

Merged
merged 3 commits into from
Oct 5, 2018
Merged

add a GetSize method #99

merged 3 commits into from
Oct 5, 2018

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Oct 4, 2018

We can also add this as an extension but it's simple enough I'd like to add it directly to the Datastore.

Use-case: The blockstore now has a GetSize and bitswap uses it for packing multiple blocks into a single message. Unfortunately, this means that bitswap is now calling blockstore.GetSize which calls datastore.Get which tends to be more expensive than datastore.Has.

Sub-PRs:

We can also add this as an extension but it's simple enough I'd like to add it
directly to the Datastore.

Use-case: The blockstore now has a GetSize and bitswap uses it for packing
multiple blocks into a single message. Unfortunately, this means that bitswap is
now calling blockstore.GetSize which calls datastore.Get which tends to be more
expensive than datastore.Has.
@ghost ghost assigned Stebalien Oct 4, 2018
@ghost ghost added the status/in-progress In progress label Oct 4, 2018
Copy link
Contributor

@kevina kevina left a comment

Choose a reason for hiding this comment

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

LGTM

@Stebalien Stebalien merged commit 0706d00 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 17:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants