-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Recursive pinning can lose existing direct pin #4650
Comments
And we probably want to guard against blocks being removed between |
@lgierth Is someone working on this? I'd like to make a try, it will help me to learn more about the pinning system. |
@schomatis thanks, please go for it :) |
@lgierth pinner is locked during this time and any access to pins does require locking (or at least it should, not true about: https://github.com/ipfs/go-ipfs/blob/864c960aa641bff2820b59b5eeb9d93be5d0998d/pin/pin.go#L491-L498), so there should not be any inconsistency. The fact that those two functions do not require locking will lead to concurrent map modification/read panic and should be fixed. |
I agree. Maybe a function could be added to add recursive pins (e.g.,
As @Kubuxu commented the So both |
Looking more carefully into the issue I have to correct myself, |
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes #4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes #4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes #4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes #4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes ipfs#4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes ipfs#4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes ipfs#4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes ipfs#4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes ipfs#4650
Otherwise, we could abort while fetching the graph and stay in a state where the direct pin is removed. fixes ipfs#4650
Version information: 0.4.14-dev
Type: bug
Description:
This bit looks like it'll lose the existing direct pin if the attempt to add the recursive pin fails. The direct pin will have been removed, and the expected recursive pin won't have succeeded: https://github.com/ipfs/go-ipfs/blob/864c960aa641bff2820b59b5eeb9d93be5d0998d/pin/pin.go#L213-L228
directPin.Remove()
should probably happen afterrecursePin.Add()
The text was updated successfully, but these errors were encountered: