Skip to content

Raft: record that the legacy-ledger migration finished #2106

Open

Description

@bplatz

Under Raft, the upgrade that binds ledgers created before name bindings (migrate_legacy) runs on every newly elected leader (fluree-db-consensus/src/raft/embedded.rs), because only a leader can propose and nothing records that it has finished. Each run scans every record in the replicated state and reads the binding of each legacy-fenced name; it proposes nothing once everything is bound.

f9400c5 (#1980) fixed the correctness problem a rerun had (a branch drop interrupted between unlisting the branch and deleting its record was re-listed live). What remains is the scan on every election.

Recording in the replicated state that the migration finished, as the @format item does on DynamoDB, would skip it. That needs a new Raft command and a change to the snapshot shape, which is positional, so it needs a versioned snapshot type like NameServiceStateV1.

Raised in the review of #1980.

Activity

  1. added
    P3
    area:storage
    on Oct 13, 2026
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

    P3area:storage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions