OpenRiak / riak_kv

Riak Key/Value Store
0 stars 0 forks source link

When triggering tree repairs - repair each vnode once #26

Closed martinsumner closed 6 months ago

martinsumner commented 7 months ago

Each vnode keeps track of the ID if the last repair it triggered. If that ID changes, it assumes it has been triggered again and will prompt repair (as long as it is not the filter vnode on the query).

This means that for each call to riak_kv_ttaaefs_manager:trigger_tree_repairs/0, each vnode should only repair the tree once.

If any faulty segment is not repaired - the next time this node performs a full-sync, the repair will be re-triggered, and each vnode should repair once (and once only) again.

Note with N nodes in M clusters, when there is a faulty segment there will be N X M fetch_clocks_nval queries for every local full-sync event (and hence trigger of read repairs). Should sync_state become true after a locally-prompted full-sync, repairs will be disabled.

To force repairs as an operator - call riak_kv_ttaaefs_manager:trigger_tree_repairs() from remote_console. This will force a read repair only once for each vnode (unless it is disabled by a local full-sync where sync_state=true). Do NOT set the riak_kv/aae_fetchclocks_repair environment variable directly.

The additional environment variable riak_kv/aae_fetchclocks_repair_force is no longer used - a sync_state=true full-sync will always disable local tree repair

martinsumner commented 7 months ago

https://github.com/nhs-riak/riak_kv/issues/25

martinsumner commented 7 months ago

https://github.com/nhs-riak/riak_test/pull/14