Skip to content

Commit

Permalink
Fix badmatch error that dialyzer found
Browse files Browse the repository at this point in the history
Pair-programmed with @reiddraper

Previously we were pattern matching a two-tuple where the value returned
was a proplist. This change now treats the value correctly as a
proplist. Note, this is still an issue in 1.4, since this was
forward-ported from the 1.4 series.
  • Loading branch information
Vagabond committed Apr 11, 2014
1 parent 43bf0e7 commit 62c886b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/riak_kv_cinfo.erl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ cluster_info_generator_funs() ->
].

aae_throttle(CPid) ->
{Throttle, ThrottleLimits} = get_aae_throttle(),
Props = get_aae_throttle(),
Throttle = proplists:get_value(current_throttle, Props),
ThrottleLimits = proplists:get_value(limits, Props),
cluster_info:format(CPid, "Current throttle: ~p msec\n", [Throttle]),
cluster_info:format(CPid, "Limit AAE throttle parameters: ~p\n",
[ThrottleLimits]).
Expand Down

4 comments on commit 62c886b

@cmeiklejohn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your commit comment is wrong here, but 👍 to the change.

@reiddraper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What specifically is wrong?

@cmeiklejohn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nevermind. Early morning misread.

@reiddraper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np

Please sign in to comment.