Skip to content

[CHANGED] Server notifies clients when server rejoins cluster #606

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 1 commit into from
Nov 27, 2017

Conversation

kozlovic
Copy link
Member

When the option Cluster.NoAdvertise is false, a server will send
an INFO protocol message to its client when a server has joined
the cluster.

Previously, the protocol would be sent only if the
joining server's "client URLs" (the addresses where clients connect
to) were new. It will now be sent regardless if the server joins
(for the first time) or rejoins the cluster.

Clients are still by default invoking the DiscoveredServersCB callback
only if they themselves detect that new URLs were added. A separate
PR may be filled to client libraries repo to be able to invoke
the callback anytime an async INFO protocol is received.

Based on @madgrenadier PR #597.

@tylertreat tylertreat mentioned this pull request Nov 14, 2017
1 task
@madgrenadier
Copy link

Thank you for accepting this change.

On the c-sharp client projects, I have a PR for the client side counterpart via PR#187.

--MG

@kozlovic kozlovic requested a review from petemiron November 17, 2017 17:20
When the option Cluster.NoAdvertise is false, a server will send
an INFO protocol message to its client when a server has joined
the cluster.

Previously, the protocol would be sent only if the
joining server's "client URLs" (the addresses where clients connect
to) were new. It will now be sent regardless if the server joins
(for the first time) or rejoins the cluster.

Clients are still by default invoking the DiscoveredServersCB callback
only if they themselves detect that new URLs were added. A separate
PR may be filled to client libraries repo to be able to invoke
the callback anytime an async INFO protocol is received.

Based on @madgrenadier PR #597.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 91.788% when pulling fa86ff9 on always_send_info into 7a4f7bb on master.

@nats-io nats-io deleted a comment from coveralls Nov 17, 2017
Copy link
Contributor

@petemiron petemiron left a comment

Choose a reason for hiding this comment

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

LGTM. tested locally.

@kozlovic kozlovic merged commit b002db4 into master Nov 27, 2017
@kozlovic kozlovic deleted the always_send_info branch November 27, 2017 20:37
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.

4 participants