Skip to content

streaming: re-establish the genesis lifecycle after Redis state loss - #84

Merged
raphael merged 1 commit into
mainfrom
genesis-state-loss
Jul 25, 2026
Merged

streaming: re-establish the genesis lifecycle after Redis state loss#84
raphael merged 1 commit into
mainfrom
genesis-state-loss

Conversation

@raphael

@raphael raphael commented Jul 25, 2026

Copy link
Copy Markdown
Member

Under v1.10.0 a bound handle observing a wholly absent lifecycle record treated it as destruction, so recovering from full Redis state loss (FLUSHDB, restore from empty) required restarting every long-running publisher and sink — a regression against the recovery property v1.9.0 shipped. Absence is distinguishable from intent: Destroy leaves a terminal tombstone.

This change lets exactly one identity re-assert a lost record: a bound generation-one handle on the flat physical key. The flat key is generation one by construction, so every concurrent re-establishment converges on the identical record, and the retried operation's own fence decides against a racing tombstone. Later generations cannot prove continuity and remain destroyed. Verification, publication, and sink consumer-group recovery heal-and-retry once through this path.

Tests: TestGenesisLifecycleReestablishedAfterStateLoss (publisher and sink resume after FLUSHDB with no new handles) and TestDestroyedGenesisStaysTerminal (tombstones stay terminal). Full repo -race suite green against live Redis. Found by goa-ai's state-loss integration suite when bumping it to v1.10.0.

A bound generation-one handle on the flat key observing a wholly absent
lifecycle record is state loss, not destruction: intentional Destroy leaves
a tombstone. The genesis identity is the one incarnation that can prove
continuity — the flat key is generation one by construction, so every
concurrent re-establishment converges on the identical record — so
verification, publication, and consumer-group recovery now atomically
re-assert it and retry once. Later generations still cannot prove
continuity and remain destroyed, as do tombstoned generations.

This restores no-restart recovery from full Redis state loss for
long-running publishers and sinks.
@raphael
raphael merged commit 87133b3 into main Jul 25, 2026
5 checks passed
@raphael
raphael deleted the genesis-state-loss branch July 25, 2026 17:31
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