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

Graceful replication shutdown #645

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

kickster97
Copy link
Member

WHAT is this pull request doing?

Wait for followers to be in sync before closing server.

HOW can this pull request be tested?

run specs for #close

@kickster97 kickster97 marked this pull request as ready for review April 3, 2024 12:18
@viktorerlingsson
Copy link
Member

LGTM 👍

A couple of questions;

Do we stop publishers to leader somewhere? Or can this keep going "forever" if you keep publishing? Maybe that is done by the server earlier when initiating shutdown?

Should there be some kind of timeout on the sync? I don't see anything like that in this code. Maybe we should let that be handled outside of LavinMQ though

@spuun
Copy link
Member

spuun commented Apr 8, 2024

Do we stop publishers to leader somewhere? Or can this keep going "forever" if you keep publishing? Maybe that is done by the server earlier when initiating shutdown?

Replication is closed last, so vhost should have closed all client connections before (and shovels/federations).

Should there be some kind of timeout on the sync? I don't see anything like that in this code. Maybe we should let that be handled outside of LavinMQ though

Yes, timeout or similar will probably be part of #547.

Let followers sync up when shutting down a replicating server.

Co-Authored-By: Jon Börjesson <[email protected]>
@kickster97 kickster97 force-pushed the graceful_replication_shutdown branch from a0b1e5a to 11c3174 Compare April 8, 2024 14:56
@kickster97 kickster97 merged commit 2759ead into main Apr 9, 2024
26 of 27 checks passed
@kickster97 kickster97 deleted the graceful_replication_shutdown branch April 9, 2024 10:14
carlhoerberg added a commit that referenced this pull request May 20, 2024
carlhoerberg added a commit that referenced this pull request Jun 5, 2024
carlhoerberg added a commit that referenced this pull request Jun 5, 2024
carlhoerberg added a commit that referenced this pull request Jun 5, 2024
carlhoerberg added a commit that referenced this pull request Jun 5, 2024
carlhoerberg added a commit that referenced this pull request Jun 14, 2024
carlhoerberg added a commit that referenced this pull request Jun 14, 2024
carlhoerberg added a commit that referenced this pull request Jun 14, 2024
carlhoerberg added a commit that referenced this pull request Jun 14, 2024
viktorerlingsson pushed a commit that referenced this pull request Sep 20, 2024
Let followers sync up when shutting down a replicating server.

Co-authored-by: Jon Börjesson <[email protected]>
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.

3 participants