Skip to content
This repository
Browse code

Put forwarding was failing - lists:nth takes two arguments.

  • Loading branch information...
commit 6fcfb60201c71b9a9f0228a678809af3bfa4b008 1 parent 980a1e8
Jon Meredith authored November 05, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  src/riak_kv_put_fsm.erl
2  src/riak_kv_put_fsm.erl
@@ -208,7 +208,7 @@ prepare(timeout, StateData0 = #state{from = From, robj = RObj,
208 208
             %% This node is not in the preference list
209 209
             %% forward on to a random node
210 210
             ListPos = crypto:rand_uniform(1, length(Preflist2)),
211  
-            {{_Idx, CoordNode},_Type} = lists:nth(ListPos),
  211
+            {{_Idx, CoordNode},_Type} = lists:nth(ListPos, Preflist2),
212 212
             _Timeout = get_option(timeout, Options, ?DEFAULT_TIMEOUT),
213 213
             ?DTRACE(?C_PUT_FSM_PREPARE, [1],
214 214
                     ["prepare", atom2list(CoordNode)]),

0 notes on commit 6fcfb60

Please sign in to comment.
Something went wrong with that request. Please try again.