Skip to content

Commit

Permalink
Merge pull request #1763 from basho/mas-pr1757-softlimitdisable
Browse files Browse the repository at this point in the history
Mas pr1757 softlimitdisable
  • Loading branch information
martinsumner authored Jun 17, 2020
2 parents db1b2de + b825588 commit 24ec5d2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 11 additions & 0 deletions priv/riak_kv.schema
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,17 @@
hidden
]}.

%% @doc Enable or disable mbox_check on PUTs
%% By default mbox_checks are performed so that vnodes with long queues
%% will not be used as put coordinators. To return to the pre-2.9 behaviour
%% of not checking, this can be disabled. The mbox_check may add additional
%% latency to PUTs in some environments.
{mapping, "mbox_check_enabled", "riak_kv.mbox_check_enabled", [
{default, on},
{datatype, flag},
hidden
]}.

%% @doc Controls which binary representation of a riak value is stored
%% on disk.
%% * 0: Original erlang:term_to_binary format. Higher space overhead.
Expand Down
5 changes: 4 additions & 1 deletion src/riak_kv_put_fsm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,10 @@ get_soft_limit_option(Options) ->
%% both the system (post forward) and the client (via options) can
%% turn off soft-limit checking. However, by default, we should
%% use them (if supported)
SoftLimitedWanted = get_option(mbox_check, Options, SoftLimitSupported),
SoftLimitedWanted =
app_helper:get_env(riak_kv, mbox_check_enabled, true) andalso
SoftLimitSupported andalso
get_option(mbox_check, Options, SoftLimitSupported),
SoftLimitedWanted.


Expand Down

0 comments on commit 24ec5d2

Please sign in to comment.