This is an erlang snippet to be run from a riak attach session
After pasting the following into the attach session, to repair all riak_kv partitions, run
RepairProc = RepairAllKv(60).
or, to repair all riak_search partitions, run
RepairProc = RepairAllSearch(60).
60 represents the tick time in seconds, change to suit your needs The partition list will be extracted from the ring, and filtered to locally owned partitions. One partition at a time will be repaired. Once per tick seconds, RepairWait will check to see if the current repair is still in progress. If not, the next repair will be started. If you need to interrupt the process before completion, either restart riak or from a riak attach session run
exit(RepairProc,kill).
In addition to the normal handoff messages, this will cause 2 log entries in the console.log:
Begginning repair of <n> [riak_kv_vnode|riak_search_vnode] partitions
and
Repair of <n> [riak_kv_vnode|riak_search_vnode] partitions completed.