Skip to content

Fix incorrect arg in call to get_primary_apl/3 by put FSM#587

Merged
jtuple merged 1 commit intomasterfrom
jdb-sloppy-quorum-api-fix
Jun 25, 2013
Merged

Fix incorrect arg in call to get_primary_apl/3 by put FSM#587
jtuple merged 1 commit intomasterfrom
jdb-sloppy-quorum-api-fix

Conversation

@jtuple
Copy link
Contributor

@jtuple jtuple commented Jun 25, 2013

Fix incorrect arg in call to riak_core_apl:get_primary_apl/3 by the put FSM.

Additionally, optimize the get and put FSMs to only compute a list of up nodes when using sloppy quorums. The strict quorum code path uses get_primary_apl/3 which already computes the list of up nodes internally.

Without this change, puts that attempt to use strict quorums (ie. disable sloppy quorums) always fail:

> {ok, C} = riak:local_client().
> C:put(riak_object:new(<<"abc">>, <<"xyz">>, <<"123">>),
        [{sloppy_quorum, false}]).
{error,all_nodes_down}

With this patch, things work as desired.

> {ok, C} = riak:local_client().
> C:put(riak_object:new(<<"abc">>, <<"xyz">>, <<"123">>),
        [{sloppy_quorum, false}]).
ok

Additionally, optimize the get and put FSMs to only compute a list of
up nodes when using sloppy quorums. The strict quorum code path uses
get_primary_apl/3 which already computes the list of up nodes
internally.
@jrwest
Copy link
Contributor

jrwest commented Jun 25, 2013

+1. code changes look good. was able to reproduce and verify fix with example above.

@jtuple jtuple merged commit d7244da into master Jun 25, 2013
@seancribbs seancribbs deleted the jdb-sloppy-quorum-api-fix branch April 1, 2015 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants