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

*: Have keeper notify when shutting down #845

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rg2011
Copy link

@rg2011 rg2011 commented Sep 17, 2021

This is a possible fix for issue #844: Have keeper notify sentinels when they are being shutdown via SIGTERM or SIGKILL.

This patch abuses the Healthy flag in the KeeperInfo.PostgresState struct. This was done to avoid changes to the Sentinel.

This patch also changes the default behaviour of the keeper, to send a dying gasp by default when shutdown. Someone might be relying on the current behaviour, for instance setting timers high enough to avoid a failover if the master restarts quickly.

@rg2011 rg2011 force-pushed the feature/keeper-notify-shutdown branch from cf4b2ec to 1fafdc3 Compare September 17, 2021 16:32
@rg2011 rg2011 force-pushed the feature/keeper-notify-shutdown branch 3 times, most recently from c2950b2 to 88b5832 Compare November 8, 2021 08:09
Avoided race condition in sending dying gasp

Renamed variable

Fixed linting issue

test: re-enable gofmt tests

Enabled smart stop after dying gasp

reordered pg close and dying gasp
@rg2011 rg2011 force-pushed the feature/keeper-notify-shutdown branch from 88b5832 to c49cb02 Compare January 9, 2022 10:32
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