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

Joining cluster without claiming partition #111

Closed
ukazap opened this issue Oct 3, 2022 · 3 comments
Closed

Joining cluster without claiming partition #111

ukazap opened this issue Oct 3, 2022 · 3 comments

Comments

@ukazap
Copy link

ukazap commented Oct 3, 2022

Hi, suppose I have 4 nodes and want to divvy up the v-nodes among node1..node3.

# before node4 joining
iex(node1@127.0.0.1)16> :riak_core_console.member_status([])
================================= Membership ==================================
Status     Ring    Pending    Node
-------------------------------------------------------------------------------
valid      37.5%      --      'node1@127.0.0.1'
valid      31.3%      --      'node2@127.0.0.1'
valid      31.3%      --      'node3@127.0.0.1'
-------------------------------------------------------------------------------
Valid:3 / Leaving:0 / Exiting:0 / Joining:0 / Down:0

What would it take to make node4 "passive" (does not claim partition/start v-nodes)?

Here's what I've tried: skipping :riak_core.register/1 and :riak_core_node_watcher.service_up/2 in node4 startup, but when I connected node4 into the cluster and start the claimant process (:riak_core_claimant.plan/0 and :riak_core_claimant.commit/0), although sent commands are still successfully routed (to vnodes in node1, node2, and node3), all the nodes are stuck in pending trying to rebalance (?).

iex(node4@127.0.0.1)13> :riak_core_console.member_status([])
================================= Membership ==================================
Status     Ring    Pending    Node
-------------------------------------------------------------------------------
valid      37.5%     25.0%    'node1@127.0.0.1'
valid      31.3%     25.0%    'node2@127.0.0.1'
valid      31.3%     25.0%    'node3@127.0.0.1'
valid       0.0%     25.0%    'node4@127.0.0.1'
-------------------------------------------------------------------------------
Valid:4 / Leaving:0 / Exiting:0 / Joining:0 / Down:0
:ok
iex(node4@127.0.0.1)14> {:ok, ring} = :riak_core_ring_manager.get_my_ring()
iex(node4@127.0.0.1)15> :riak_core_ring.pretty_print(ring, [:legend])
==================================== Nodes ====================================
Node a: 6 ( 37.5%) node1@127.0.0.1
Node b: 5 ( 31.3%) node2@127.0.0.1
Node c: 5 ( 31.3%) node3@127.0.0.1
Node d: 0 (  0.0%) node4@127.0.0.1
==================================== Ring =====================================
abca|abcb|abcc|abca|
:ok
@albsch
Copy link
Member

albsch commented Oct 4, 2022

I don't think joining a cluster without intended participation is supported. What is a passive node supposed to do after joining?

@ukazap
Copy link
Author

ukazap commented Oct 5, 2022

The passive node will act as a client that is able to send commands to one or more of the vnodes in the cluster.

Or is there a more established way to achieve that?

@albsch
Copy link
Member

albsch commented Oct 10, 2022

I get what you mean now. Sadly, this is not supported by riak_core, your case is a special case of assigning workload to different loads, where your assigned workload of that passive node would be 0.

See issue #40 :

Server capacity adjustment by “weighting” did not exist: all servers were assumed equal.

I don't know when and how this issue will be tackled, as the project is currently only in maintenance mode. If someone is up to the task and tries to implement it, it would be a welcomed contribution.

Going to close this issue, as this is tracked in the other bigger issue.

@albsch albsch closed this as completed Oct 10, 2022
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

No branches or pull requests

2 participants