electric-sql / electric-sql/electric

Fire stack events as part of `StatusMonitor` state transitions

Open
#2,783 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10.4k
Forks
375
Avg merge
3d 1h
Merged PRs (30d)
18

Description

While working on https://github.com/electric-sql/electric/pull/2781 to fix an issue where we would sometimes omit to fire a `:ready` stack event message when the replication client alone recovered from a disconnection, @alco and I discussed and noticed that the separation between `StatusMonitor`'s state and the stack events can be confusing.

The suggestion here is to essentially move most of the important stack events to be fired from within `StatusMonitor` so that they are consistent with Electric's actual status and behaviour (health check + responses).

This could be in the form of monitoring internal state transitions and firing stack events for particular ones that we already fire events for, but this requires some investigation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.