Skip to content

Require contiguous history for backfillHistory - #12741

Open
stuart-wells wants to merge 1 commit into
mainfrom
stuartwells/backfill-history-contiguity-check
Open

stuart-wells wants to merge 1 commit into
mainfrom
stuartwells/backfill-history-contiguity-check

Conversation

@stuart-wells

@stuart-wells stuart-wells commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

backfillHistory now checks the history it receives from the source cluster. Event IDs must run on from the start with no gaps, each event's version must match the snapshot's version history, and the stream must reach the snapshot's last event. If any check fails, it returns a retryable Internal error instead of persisting mutable state.

Why?

GetWorkflowExecutionRawHistoryV2 can end early without an error. For example, its continuation token pins the branch token from page 1, so if the source moves the run to another storage tier between pages, the last range reads as empty with no next token.

The pagination issue will be fixed in another PR, but this is being kept for hardening.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

  • Any intentional history gaps would now DLQ instead of applying.

Related to #12742

@stuart-wells stuart-wells added the team/cgs-foundation Require cgs foundation team review label Oct 26, 2026
@stuart-wells
stuart-wells marked this pull request as ready for review October 26, 2026 22:25
@stuart-wells
stuart-wells requested a review from a team as a code owner October 26, 2026 22:25

This branch has not been deployed

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

Labels

team/cgs-foundation Require cgs foundation team review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant