Skip to content

IPFS GC & Lotus Splitstore #129

@Stebalien

Description

@Stebalien

See #120 & #8

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:

  1. 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.
  2. We need a way to unpin old tipsets.

Differences include:

  1. In the splitstore, we want to move unreferenced blocks instead of just deleting them.
  2. 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.
  3. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions