Skip to content

Don't change the current state when checkpointing - #325

Open
jdewar wants to merge 1 commit into
commanded:masterfrom
merchant-ly:jd/keep-state-when-checkpointing
Open

Don't change the current state when checkpointing#325
jdewar wants to merge 1 commit into
commanded:masterfrom
merchant-ly:jd/keep-state-when-checkpointing

Conversation

@jdewar

@jdewar jdewar commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

When checkpointing I don't believe we want to change the state. This usually plays out fine because after a checkpoint when catching_up (which is probably the most common non-:subscribed state), it immediately sets the state back to catching_up when it sees that it's behind. However, persisting event position has nothing to do with state transition, and this feels like a copy-paste mistake.

I don't have an idea what a test for this would look like; the situation we ran into was a subscription getting stuck in a state that would stop event processing. It's several months back at this point so the details have been lost, but we had gone through a number of eventstore tweaks in order to make a massive import of data go fast: we increased checkpoint_threshold > 1 for projectors and we added event selectors, while we were also at the mercy of some database networking issues via our database provider.

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