Skip to content

CLI support for riak_client:repair_node()#156

Open
hmmr wants to merge 3 commits into
OpenRiak:openriak-3.4from
TI-Tokyo:tiot/openriak-3.4/node-repair-cli
Open

CLI support for riak_client:repair_node()#156
hmmr wants to merge 3 commits into
OpenRiak:openriak-3.4from
TI-Tokyo:tiot/openriak-3.4/node-repair-cli

Conversation

@hmmr

@hmmr hmmr commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Expose riak_client:repair_node/0 as riak admin node repair.

Related PRs: OpenRiak/riak#36. Test in OpenRiak/riak_test#29.

@martinsumner

Copy link
Copy Markdown
Contributor

I'm not sure about repairing multiple nodes, what happens when partitions are covered in more than one nodes - the behaviour might be unpredictable. Having nodes of all as well, I'm not sure it is obvious what will happen in this case.

I've only done non-functional testing for repairing a single node, so I think it should be restricted to repairing a single node at a time. There are are advanced configurable options like double-pair that might not behave as expected with multiple node repairs being triggered.

@hmmr

hmmr commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Would it, then, be appropriate to extend the action of riak admin node repair with status subcommand which would report if any repairs are in progress? And if so, prevent a new repair from starting?

@martinsumner

Copy link
Copy Markdown
Contributor

Repairs can be tracked like other handoffs/transfer operations - so there's not a need for a status, in that there is another way of following this .

However, there is a repair_status for each vnode (tracked by the vnode_manager). So just as node_repair is just a wrapper to call repair on all vnodes on the node, there could be a call to repair_status that collates the status across vnodes - but the status is just in_progress/not_found.

There are better ways to track progress - so I'm not sure it is necessary, but it could give you a definitive in_progress/complete statement.

There may be more complications here. I can't remember the history behind this comment:

https://github.com/OpenRiak/riak_test/blob/a9605720be2efa567dde65489b0caf415f7e4d92/tests/node_repair_big.erl#L187

Perhaps I hadn't thought of using repair_status, or perhaps there was an issue with it.

@hmmr hmmr force-pushed the tiot/openriak-3.4/node-repair-cli branch from f43eade to 4bba66a Compare June 18, 2026 12:33
@hmmr

hmmr commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

I have added subcommands repair status and repair stop, and extended start with a check to only allow repair to start when no other repairs are running.

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.

3 participants