Skip to content

Interruptible backfills #3886

Closed
Closed

Description

@timmaxw

The Raft logic assumes that the store is left in a valid state even if the backfill is interrupted. Currently that isn't actually true. There are three possible solutions, presented in order from least to most work:

  • Create a fake branch before the backfill. Write the fake branch to the metainfo. Do the backfill in such a way that every individual key is somewhere on the path between the start point and the end point. Write the real branch to the metainfo. If we crash, everything will still work; the fake branch will be treated like a real branch that just happens to look like a partial copy of the contents of some other branch.
  • Backfill in key order from left to right. As we go, update the metainfo to indicate which parts have been updated. This has the added benefit that an interrupted backfill can be resumed where it left off.
  • Same as above, but backfill incrementally in many small chunks. This has the added benefit of reducing memory usage, getting rid of the disk-backed write queue, and improving backfill performance.

Activity

  1. added this to the milestone on Mar 4, 2015
  2. timmaxw commented on Apr 14, 2015

    @timmaxw
    MemberAuthor

    This is in CR 2807. I implemented the third option.

  3. timmaxw commented on May 1, 2015

    @timmaxw
    MemberAuthor

    Fixed in 8163dd4.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions