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

pin: add context and error return to most of the Pinner functions #6715

Merged
merged 3 commits into from
Nov 18, 2019

Conversation

MichaelMure
Copy link
Contributor

@MichaelMure MichaelMure commented Oct 17, 2019

At Infura we have the need for a custom out-of-process (remote actually) Pinner. Problem is, at the moment this interface assume that the list of pins is loaded in memory and access are instant and can't fail.

This PR add a context for cancellation and a return error to most of the functions of Pinner. Almost everything else is a consequence of those changes (see my comment later for the excessive locking).

This PR use a forked go-ipfs-provider to follow those changes, PR at ipfs/go-ipfs-provider#16

pin/pin.go Show resolved Hide resolved
@MichaelMure
Copy link
Contributor Author

CI failure doesn't seems related.

@MichaelMure
Copy link
Contributor Author

@Stebalien could you have a look ?

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

❤️

Sorry for the massive delay.

pin/pin.go Show resolved Hide resolved
pin/pin.go Show resolved Hide resolved
pin/pin.go Show resolved Hide resolved
pin/pin.go Show resolved Hide resolved
@MichaelMure
Copy link
Contributor Author

Alright, PR comments addressed and rebased.

I connected an extra context that was just waiting for it.

The last thing would be to edit go.mod once ipfs/go-ipfs-provider#16 is merged.

@Stebalien
Copy link
Member

LGTM! I've merged and bubbled the provider dep change. I'll merge once CI passes.

@Stebalien Stebalien merged commit fbc284a into ipfs:master Nov 18, 2019
@Stebalien
Copy link
Member

🚀

Thanks!

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.

2 participants