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

Policy key to not promote unsynchronised queues. #1578

Merged
merged 4 commits into from Apr 25, 2018

Conversation

hairyhum
Copy link
Contributor

This new policy controls if unsynchronised slaves should be promoted
after master crash. If set to when-synced, unsynchronised slaves
will not be promoted, keeping the state of the queue, but making it
unavailable until master node returns.

This change is supposed to make the cluster shutdown safier,
because queues can fail or be killed on shutdown.

The queues without master will be available from the management UI
and can be deleted and redeclared, but will not automatically loose
messages.

Trying to declare or passively declare the queue will result in a
timeout error. Same way as if the master was gracefully stopped with
ha-promote-on-shutdown: when-synced

This setting probably can be backported to 3.6.

[#156811690]

This new policy controls if unsynchronised slaves should be promoted
after master crash. If set to `when-synced`, unsynchronised slaves
will not be promoted, keeping the state of the queue, but making it
unavailable until master node returns.

This change is supposed to make the cluster shutdown safier,
because queues can fail or be killed on shutdown.

The queues without master will be available from the management UI
and can be deleted and redeclared, but will not automatically loose
messages.

Trying to declare or passively declare the queue will result in a
timeout error. Same way as if the master was gracefully stopped with
ha-promote-on-shutdown: when-synced

[#156811690]
{stop, normal, State}
{stop, normal, State};
{error, {not_synced, _}} ->
rabbit_log:error("Mirror queue ~p in unexpected state after gm_deaths."
Copy link
Member

Choose a reason for hiding this comment

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

This error message is too much inside baseball.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you clarify?

Copy link
Member

Choose a reason for hiding this comment

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

"gm_deaths" is an implementation detail that makes no sense to the user.

@michaelklishin michaelklishin added this to the 3.7.5 milestone Apr 25, 2018
@michaelklishin michaelklishin merged commit 8aea4b8 into master Apr 25, 2018
@michaelklishin michaelklishin deleted the queue-not-promote-on-crash branch April 25, 2018 14:31
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.

None yet

2 participants