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

Change default to recalc #51

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions priv/riak_kv.schema
Original file line number Diff line number Diff line change
Expand Up @@ -1471,23 +1471,30 @@
{commented, 900}
]}.

%% @doc Enable the `recalc` compaction strategy within the leveled backend in
%% riak. The default (when disabled) is `retain`, but this will leave
%% uncollected garbage within the, journal.
%% It is now recommended from Riak KV 2.9.2 to consider the `recalc` strategy.
%% @doc Enable the `recalc` compaction strategy
%% This is relevant only to the leveled backend. If disabled the `retain`
%% strategy will be used, but this will leave uncollected garbage within the
%% journal.
%%
%% The default `retain` strategy retains a history of key changes in the
%% journal, whereas the `recalc` strategy discards that history, but will redo
%% a diff_index_specs calculation when reloading each object.
%%
%% It is recommended to use the `recalc` strategy.
%%
%% This strategy has a side effect of slower startups, and slower recovery
%% from a wiped ledger - but it will not keep an overhead of garbage within
%% the Journal.
%%
%% It should be possible to move from `retain` to `recalc` via configuration
%% change. However, it is not possible to switch from `recalc` back to
%% `retain`. This switch can only be made for new nodes receiving data
%% through riak transfers (not inheriting data on disk).
%% The default `retain` strategy retains a history of key changes in the
%% journal, whereas the `recalc` strategy discards that history, but will redo
%% a diff_index_specs calculation when reloading each object.
%% `retain` just by reverting the config. This switch can only be made for
%% new nodes receiving data through riak transfers (not inheriting data on
%% disk) - so a rolling `riak admin cluster replace` would be required to
%% revert to `retain`.
{mapping, "leveled_reload_recalc", "riak_kv.leveled_reload_recalc", [
{datatype, {flag, enabled, disabled}},
{default, disabled},
{default, enabled},
{commented, enabled}
]}.

Expand Down
Loading