Skip to content

Raft rebase leaves every node reading the replaced line's index until a full rebuild #2380

Open

Description

@bplatz

A non-fast-forward rebase replaces a branch's line. On the local path the branch's index is reset to the source's (or none) right after the new head is published (#2296). The Raft path does not reset it: process_rebase (fluree-db-consensus/src/raft/commit_worker.rs) proposes an AdvanceRef and nothing else, and prepare_rebase copies the source's index onto the branch only where it is newer than the branch's own.

Effect: every node then loads the branch's index of the replaced line under the new head, so a fresh load reads that index with the new line's later commits on top. The source commits the replay was based on are missing from reads until the post-rebase build lands. That build cannot extend the stale index (the incremental build refuses a base of another line, #2296), so it is a full rebuild, and the window lasts as long as a full rebuild of the branch.

Why not a one-liner: the Raft reset_head command clears the branch's queue (state_machine.rs), so the worker cannot reuse it mid-rebase. Fixing this needs a replicated command that lowers or replaces the index without touching the queue, proposed together with (or as part of) the rebase's ref advance.

Activity

  1. added
    bug
    P2
    area:server
    on Nov 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

    P2area:serverbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions