-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
NOTE: I'm discussing long-term solutions here, not short-term. Unfortunately, we'll likely have to go with a special-purpose solution due to time constraints, for now.
The solution-space for GC in the lotus splitstore is very similar to IPFS pinning/GC:
- We need a way open some form of "transaction" where anything touched in the transaction isn't garbage collected till we've had a chance to "pin" it.
- We need a way to unpin old tipsets.
Differences include:
- In the splitstore, we want to move unreferenced blocks instead of just deleting them.
- Lotus needs the ability to pin IPLD selectors (i.e., pin a tipset without pinning parents/sectors) while this is only a "nice to have" in go-ipfs.
- The latest go-ipfs GC/pinning proposal would have written a mapping for every pin/block pair, which would be way to slow to pin new tipsets. Prior IPFS GC proposals avoided this issue by assuming that the children of pinned blocks were already pinned (recursive pins). But that assumption doesn't hold with arbitrary selectors.
Difference 3 is the hardest one to reconcile, but not impossible, and go-ipfs would benefit significantly from such an optimization.
To do this generically, we'd need to track how many pinned parent blocks (or direct pins) reference a given block and it's children via a specific selector. Prior IPFS GC proposals left off the "via a specific selector" part.
Metadata
Metadata
Assignees
Labels
No labels