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

ipfsbstore: Fix has for non-existing blocks #5492

Merged
merged 2 commits into from
Feb 1, 2021
Merged

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Feb 1, 2021

Fixes #5361

Discovered this when doing something unrelated on top of this blockstore

Basically the implementation of blockstore.Has would call block/stat on the ipfs node - doing that in online mode will obviously try to fetch that node from the network. This then compounds with the default blockservice implementation, which calls Has before calling Put, which is basically guaranteed to hang in online mode when trying to retrieve data into ipfs which can't be fetched from the ipfs network (also means that data would be fetched from ipfs first before being retrieved from filecoin..)

Copy link
Contributor

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

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

🎉

@magik6k magik6k merged commit b7555fd into master Feb 1, 2021
@magik6k magik6k deleted the fix/ipfsbstore-has-hang branch February 1, 2021 14:46
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.

retrieval hangs when using IpfsOnlineMode=true
2 participants