-
-
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
Temporary pins when adding looks buggy #4559
Comments
@Stebalien Is someone working on this? How hard do you think it would be to implement this? Is it apt for a beginner to IPFS? |
@schomatis probably not a good beginner project. It requires making deep modifications to the pin system. |
@Stebalien Thanks for the heads up. I have a couple of issues in line regarding locks, maybe after that I can give this a try. |
@Stebalien Is this still a relevant issue to work on? I'm a bit confused, you mentioned it in the Could you point me in the right direction of what should I be reading to address this? |
I think temporary in-memory pins can implemented in non-invasive way by storing them in Pinner https://github.com/ipfs/go-ipfs/blob/master/pin/pin.go#L183 and adding temporary pins to ColoredSet here: https://github.com/ipfs/go-ipfs/blob/master/pin/gc/gc.go#L171. That would not be interfering with #4757 proposal. |
@schomatis we're discussing various ways to fix the pin system but haven't decided on any yet. In the foreseeable future, the pinning system will probably stay as it is. @Voker57's right on this, we can probably add them to the pinner. I assumed this would require a deep modification but that may not be the case. |
@Stebalien I understand. Could it be useful to prepare a PoC PR to start exploring @Voker57 's option? Or should I wait for the proposal to mature some more? |
I happened on this while thinking about the best way to implement our https://github.com/NixOS/nix/blob/965b80347e97169f266466603e29a57359c4083c/src/libstore/store-api.hh#L490 --- never-mind the messary particular our My thoughts are fuzzy, but I'm imagining something like mutable reference associated with a temporary pin set used with a transaction like interface. In fact, if there were transactions for updating a bunch of IPNS at once, I suppose the pin set reference would be the analogue to a temporary, to keep a consistent IPNS<->table / SQL transactions in particular analogy. |
First, we don't appear to actually mark them as temporary. The following code appears dead in practice:
https://github.com/ipfs/go-ipfs/blob/1a0d6ec2ba1e114293cbb0a7d2394d7b48a554c2/core/coreunix/add.go#L198-L204
Second, this is not crash safe. We need a way to add in-memory pins.
The text was updated successfully, but these errors were encountered: