Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

correctly convert the datastore not found errors #10

Merged
merged 2 commits into from
Aug 7, 2018

Conversation

Stebalien
Copy link
Member

No description provided.

@Stebalien
Copy link
Member Author

@Stebalien Stebalien merged commit f02873f into master Aug 7, 2018
@Stebalien Stebalien deleted the fix/not-found-err branch August 7, 2018 16:57
case cacheHave:
return bool(h), -1, true
case cacheSize:
return true, int(h), true
}
}
return false, -1, false
}

func (b *arccache) Has(k *cid.Cid) (bool, error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@taylormike

I rushed this change through as I ended up leaving a bunch of packages semi-broken (due to ipfs/go-datastore#92).

Before, arccache.Has would always call GetSize on the underlying datastore. Now, it calls Has unless someone as already called GetSize or Get (to avoid the overhead of actually getting the value). Will this change interfere with your bitswap changes?

Copy link
Contributor

@taylormike taylormike Aug 8, 2018

Choose a reason for hiding this comment

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

@Stebalien
No, this will not interfere with my bitswap changes. I tested both your recent changes and my bitswap changes together. They both look good.
Thank you for your help and the quick turnaround.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants