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

leveled recalc strategy should default to enabled #47

Open
martinsumner opened this issue Nov 29, 2024 · 0 comments
Open

leveled recalc strategy should default to enabled #47

martinsumner opened this issue Nov 29, 2024 · 0 comments

Comments

@martinsumner
Copy link

martinsumner commented Nov 29, 2024

In riak 2.9.2 the option to use a recalc strategy for rebuilding the key store in leveled was introduced:

riak_kv/priv/riak_kv.schema

Lines 1445 to 1463 in feced03

%% @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.
%% 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.
{mapping, "leveled_reload_recalc", "riak_kv.leveled_reload_recalc", [
{datatype, {flag, enabled, disabled}},
{default, disabled},
{commented, enabled}
]}.

The release notes guided that this option should be enabled, though it was disabled by default. It was disabled by default as there was no way of reverting back from recalc to retain, and so the intention was to give users time to test the change before enabling the configuration.

Sufficient time has now passed, and the configuration has been tested over many years in production environments - it should now be enabled by default.

@martinsumner martinsumner changed the title leveled recalc strategy should default to 2 leveled recalc strategy should default to enabled Dec 5, 2024
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

1 participant