Skip to content

Commit 47706a5

Browse files
authored
Change default to recalc (OpenRiak#51)
The default has been recommended for several years, and major customers have used it. However, the recommendation was only made via release notes so may have been missed by some. When the change was first made, there was some nervousness about the potential scope of the change and its irreversability - hence why it was not immediately the default. However, sufficient time has passed to put-aside those concerns.
1 parent 5c69298 commit 47706a5

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

priv/riak_kv.schema

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,23 +1471,30 @@
14711471
{commented, 900}
14721472
]}.
14731473

1474-
%% @doc Enable the `recalc` compaction strategy within the leveled backend in
1475-
%% riak. The default (when disabled) is `retain`, but this will leave
1476-
%% uncollected garbage within the, journal.
1477-
%% It is now recommended from Riak KV 2.9.2 to consider the `recalc` strategy.
1474+
%% @doc Enable the `recalc` compaction strategy
1475+
%% This is relevant only to the leveled backend. If disabled the `retain`
1476+
%% strategy will be used, but this will leave uncollected garbage within the
1477+
%% journal.
1478+
%%
1479+
%% The default `retain` strategy retains a history of key changes in the
1480+
%% journal, whereas the `recalc` strategy discards that history, but will redo
1481+
%% a diff_index_specs calculation when reloading each object.
1482+
%%
1483+
%% It is recommended to use the `recalc` strategy.
1484+
%%
14781485
%% This strategy has a side effect of slower startups, and slower recovery
14791486
%% from a wiped ledger - but it will not keep an overhead of garbage within
14801487
%% the Journal.
1488+
%%
14811489
%% It should be possible to move from `retain` to `recalc` via configuration
14821490
%% change. However, it is not possible to switch from `recalc` back to
1483-
%% `retain`. This switch can only be made for new nodes receiving data
1484-
%% through riak transfers (not inheriting data on disk).
1485-
%% The default `retain` strategy retains a history of key changes in the
1486-
%% journal, whereas the `recalc` strategy discards that history, but will redo
1487-
%% a diff_index_specs calculation when reloading each object.
1491+
%% `retain` just by reverting the config. This switch can only be made for
1492+
%% new nodes receiving data through riak transfers (not inheriting data on
1493+
%% disk) - so a rolling `riak admin cluster replace` would be required to
1494+
%% revert to `retain`.
14881495
{mapping, "leveled_reload_recalc", "riak_kv.leveled_reload_recalc", [
14891496
{datatype, {flag, enabled, disabled}},
1490-
{default, disabled},
1497+
{default, enabled},
14911498
{commented, enabled}
14921499
]}.
14931500

0 commit comments

Comments
 (0)