Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shut down the connection supervisor in case of an unrecoverable replication error #2189

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alco
Copy link
Member

@alco alco commented Dec 19, 2024

The StackSupervisor will shut itself down as a consequence.

In a multi-tenant setup, this effectively shuts down a single tenant while allowing the other tenants to keep chugging along.

Closes #2178.

@alco alco force-pushed the alco/invalidated-replication-slot branch from 95afd17 to d96cc2d Compare December 20, 2024 13:55
…cation error

The StackSupervisor will shut itself down as a result because the
connection supervisor is marked as a significant child.

In a multi-tenant setup, this effectively shuts down a single tenant
while the other tenants keep running.
Copy link

netlify bot commented Dec 20, 2024

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit 3b9df57
🔍 Latest deploy log https://app.netlify.com/sites/electric-next/deploys/676577db030a6b0009e80cbb
😎 Deploy Preview https://deploy-preview-2189--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.

@alco alco force-pushed the alco/invalidated-replication-slot branch from d96cc2d to 3b9df57 Compare December 20, 2024 13:57
@alco alco requested a review from icehaunter December 20, 2024 13:58
# Perform supervisor shutdown in a task to avoid a circular dependency where the manager
# process is waiting for the supervisor to shut down its children, one of which is the
# manager process itself.
Task.start(Electric.Connection.Supervisor, :shutdown, [state.stack_id, error])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, but let's dispatch_stack_event here too, so that the control plane can be aware of what's happened and why this is down

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.

Don't stop the system when we exceed slot size
2 participants