electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.47k stars 156 forks source link

feat: Add global stack event registry and block requests before ready #2019

Closed msfstef closed 1 day ago

msfstef commented 1 day ago

PR by @icehaunter and me - makes the StackSupervisor accept a stack event registry that it uses to dispatch status events about the state of the stack.

This was preliminary work for multitenancy, and also fixes https://github.com/electric-sql/electric/issues/1922 since now we hold connections when the stack is not ready, and release them when we receive a "ready event" or time them out with a 503 - avoids crashing the ETS inspector which was trying to use a DB connection from an uninitialised pool.

Integration test is broken from https://github.com/electric-sql/electric/pull/2009

netlify[bot] commented 1 day ago

Deploy Preview for electric-next ready!

Name Link
Latest commit a2597dad986a11da1bd57745fbc957914b26dba2
Latest deploy log https://app.netlify.com/sites/electric-next/deploys/673f40e541486d000875b53a
Deploy Preview https://deploy-preview-2019--electric-next.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.