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

fix: prevent replicants from joining core nodes that disabled node discovery #178

Conversation

SergeTupchiy
Copy link
Contributor

Core node may leave a cluster and disable discovery. In this case, replicants must ignore (don't connect to) this node.

…scovery

Core node may leave a cluster and disable discovery.
In this case, replicants must ignore (don't connect to) this node.
@@ -61,6 +61,9 @@
, db_nodes => [node()]
, shard_badness => [{mria_rlog:shard(), float()}]
, custom_info => _
%% We can't prevent core node discovery if the node is still up and reachable.
%% Thus, a replicant can discover a core but must ignore it if discovery is disabled.
, discovery_enabled => boolean()
Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, it can just return something like undefined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but I've set the default to true everywhere already..., e.g.:

is_core_node_discovery_enabled() ->
    application:get_env(mria, core_node_discovery, true).

Please let me know if you prefer to change it..

@SergeTupchiy SergeTupchiy merged commit 21c5954 into emqx:main Apr 9, 2024
1 check passed
SergeTupchiy added a commit to SergeTupchiy/ekka that referenced this pull request Apr 9, 2024
SergeTupchiy added a commit to SergeTupchiy/ekka that referenced this pull request Apr 9, 2024
SergeTupchiy added a commit to SergeTupchiy/emqx that referenced this pull request Apr 9, 2024
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