Skip to content

fix: replay topics with version 1 cursors instead of failing open - #14

Merged
St4NNi merged 1 commit into
mainfrom
fix/legacy-topic-cursor
Sep 24, 2026
Merged

St4NNi merged 1 commit into
mainfrom
fix/legacy-topic-cursor

Conversation

@St4NNi

@St4NNi St4NNi commented Sep 24, 2026

Copy link
Copy Markdown
Member

Description

Stores written by Craqle 0.2 hold version 1 topic cursors. Version 2 added a branch fence, and every reader rejected a version 1 cursor as expired. Reconciliation runs at open, so any node that ever applied a replicated record failed to open once Irokle sync was configured. The audited cursor repair could not help, because it needs an open node with sync configured.

A verified version 1 cursor now counts as no cursor: the topic replays from the start of its current branch, and the first consumed record stores a fenced version 2 cursor. Replay is safe because a record whose dot the graph clock already covers applies as a duplicate. Corrupt cursors still fail and are never reset.

Changes

  • Read stored cursors through one helper that maps a verified version 1 cursor to no cursor, used by topic catch-up and by the applied clock of history checks.
  • Add legacy_cursor_replays: a replica with a version 1 cursor reconciles, stores a fenced cursor at the same position and exports the same graph.
  • Share the version 1 cursor encoding between the decoder test and the new test.
  • Note the replay in the 0.2 upgrade section of the changelog.

@St4NNi
St4NNi merged commit 1d82db8 into main Sep 24, 2026
24 checks passed
@St4NNi
St4NNi deleted the fix/legacy-topic-cursor branch September 24, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant