Skip to content

Require new epoch roots to pin before replacing the previous root #612

Description

@lthibault

Epoch advance currently logs a failed pin_add, continues to swap the CidTree root, and unpins the previous root. A failed recursive pin can therefore leave both the newly selected root and the previous active root unpinned and collectible.

Make the pin/swap/unpin transition safe: do not unpin the prior root or publish the new epoch unless the new root is durably pinned (or define and expose an explicit alternative recovery state).

Acceptance criteria:

  • pin failure preserves the previous root and pin;
  • success maintains the documented ordering;
  • focused tests cover pin failure, pre-warm failure, and successful advancement.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — fix before next milestonebugSomething isn't workinginfraInfrastructure & platform capabilities

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions