Sorry,I miss up,since Last and [{_, N}|Rest] is not the same list.
On Fri, Apr 18, 2014 at 4:06 PM, chuang <[email protected]> wrote:
> In the source of riak_core_gossip(version 1.4.8),there is a function
> source below:
>
> 451 attempt_simple_transfer(Seed, Ring, [{_, N}|Rest], TargetN, Exit, Idx,
> Last) ->
> 452 %% just keep track of seeing this node
> 453 attempt_simple_transfer(Seed, Ring, Rest, TargetN, Exit, Idx+1,
> 454 lists:keyreplace(N, 1, Last, {N, Idx}));
>
> I think the source
> 451 attempt_simple_transfer(Seed, Ring, [{_, N}|Rest], TargetN, Exit, Idx,
> Last) ->
>
> should be:
> 451 attempt_simple_transfer(Seed, Ring, [{N, _}|Rest], TargetN, Exit, Idx,
> Last) ->
>
> since in line 454,the lists:keyreplace function operate key on position 1.
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com