Skip to content

Locking support in cluster formation #1258

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

Merged
merged 3 commits into from
Jun 12, 2017
Merged

Conversation

dcorbacho
Copy link
Contributor

Adapted from rabbitmq_autocluster to avoid race conditions on startup

Part of #1257

dcorbacho added 2 commits June 9, 2017 12:18
Adapted from autocluster to avoid race conditions on startup

rabbitmq-server#125
[#146871615]
lock() ->
Backend = backend(),
rabbit_log:info("Will try to lock with peer discovery backend ~s", [Backend]),
case Backend:lock(node()) of
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the backend indicate whether locking is supported, like we do for registration? Should lock/1 and unlock/1 be a part of https://github.com/rabbitmq/rabbitmq-common/blob/rabbitmq-server-1257/src/rabbit_peer_discovery_backend.erl?

Copy link
Collaborator

Choose a reason for hiding this comment

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

There was a missing PR: https://github.com/rabbitmq/rabbitmq-common/pull/204/files.

The lock/1 return value of unsupported is not very consistent with supports_registration/0 but
it's consistent with rabbitmq-autocluster :/. Arguably this is not a show stopper for #1258 and 3.7.0 release plans.

@michaelklishin michaelklishin merged commit 69d2517 into master Jun 12, 2017
@dumbbell dumbbell deleted the rabbitmq-server-1257 branch January 2, 2018 15:17
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.

2 participants