Skip to content

durable: an upgraded instance whose older tick left a service in flight can fail every Recover #259

Closed as not planned

Description

@reka18

What happens

#235 makes a timer transition stop the services of a state it leaves, live and on replay, but only for journal format 2 and later. A tick from an older journal (format 0, the released version, or 1) replays as that version ran it, so a service of a state the tick left stays in flight in the recovered Handle.

The next checkpoint this version writes records the configuration, which no longer declares that service. If the host then calls RunService for it, the settle is recorded after the checkpoint, and every later Recover fails:

durable: recovering "u": at step 4: durable: replaying service "up:fetching:invoke:0": no in-flight service to settle

Reproduction: TestRecover_AnOlderVersionsTickThenACheckpointAndASettle_FailsRecover in durable/tick_drivers_test.go, for formats 0 and 1. It pins today's failure.

Options tested in #235 (local prototypes; the scenarios were a brick, an older run that settled after its tick, an older run that re-entered the state, and a compound state's service):

Option Brick Settled after tick Re-entered Compound service
Today fails passes passes passes
Replay older ticks with today's rules passes fails passes passes
After replaying an older journal, stop the services its ticks left in flight passes passes passes passes
Refuse RunService for a state that isn't active passes passes passes fails (#249)

The third option passes every tail tried, but it reverses #235's documented promise that an older version's tick replays as it ran: a service the older version left in flight stops at Recover, so its later settle, which would fire onDone in a state that no longer declares it, never happens.

Relates to: #235, #236, #214

Activity

  1. reka18 commented on Nov 19, 2026

    @reka18
    ContributorAuthor

    Closed into #253, which tracks the compatibility items to decide before durable's first release. durable is unreleased, so this can't happen yet.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions