Oh, sorry for my fast response ^_^

This issue should due to the miscommunication between 
riak_core_handoff_sender.erl and riak_core_handoff_receiver.erl

Zheng Zhibin

在 2012-1-22,上午11:23, Zheng Zhibin 写道:

> I think this basically due to different definition of Protocol Buffers 
> between Riak and Riak Erlang Client.
> 
> Updated them into the same version, and make clean & make, this should help.
> 
> Zheng Zhibin
> 
> 在 2012-1-22,上午11:18, Zheng Zhibin 写道:
> 
>> saw the code in "deps/riak_core/src/riak_core_handoff_receiver.erl"
>> 
>> process_message(?PT_MSG_INIT, MsgData, State=#state{vnode_mod=VNodeMod}) ->
>>   <<Partition:160/integer>> = MsgData,
>>   lager:info("Receiving handoff data for partition ~p:~p", [VNodeMod, 
>> Partition]),
>>   {ok, VNode} = riak_core_vnode_master:get_vnode_pid(Partition, VNodeMod),
>>   State#state{partition=Partition, vnode=VNode};
>> process_message(?PT_MSG_OBJ, MsgData, State=#state{vnode=VNode, 
>> count=Count}) ->
>>   Msg = {handoff_data, MsgData},
>>   case gen_fsm:sync_send_all_state_event(VNode, Msg, 60000) of
>>       ok ->
>>           State#state{count=Count+1};
>>       E={error, _} ->
>>           exit(E)
>>   end;
>> process_message(?PT_MSG_OLDSYNC, MsgData, State=#state{sock=Socket,
>>                                                      tcp_mod=TcpMod}) ->
>>   TcpMod:send(Socket, <<?PT_MSG_OLDSYNC:8,"sync">>),
>>   <<VNodeModBin/binary>> = MsgData,
>>   VNodeMod = binary_to_atom(VNodeModBin, utf8),
>>   State#state{vnode_mod=VNodeMod};
>> process_message(?PT_MSG_SYNC, _MsgData, State=#state{sock=Socket,
>>                                                    tcp_mod=TcpMod}) ->
>>   TcpMod:send(Socket, <<?PT_MSG_SYNC:8, "sync">>),
>>   State;
>> process_message(?PT_MSG_CONFIGURE, MsgData, State) ->
>>   ConfProps = binary_to_term(MsgData),
>>   State#state{vnode_mod=proplists:get_value(vnode_mod, ConfProps),
>>               partition=proplists:get_value(partition, ConfProps)};
>> process_message(_, _MsgData, State=#state{sock=Socket,
>>                                         tcp_mod=TcpMod}) ->
>>   TcpMod:send(Socket, <<255:8,"unknown_msg">>),
>>   State.
>> 
>> Your request message sent from riak-erlang-client has been droped to the 
>> last one of matching.
>> 
>> 
>> Zheng Zhibin
>> 
>> 在 2012-1-22,上午12:43, Mike Oxford 写道:
>> 
>>> 3 node cluster of 1.0.2, level_db backend, pb interface. Build up a
>>> store of 9 connections (3 to each node) and pull one out randomly.
>>> 
>>> --snip
>>> 62> 
>>> riakc_pb_socket:list_keys(gen_server:call(forum_store:get_random_pid(alliance),
>>> get_connector_pid), <<"alliance_overview">>
>>> {ok,[]}
>>> 
>>> 63> 
>>> riakc_pb_socket:list_keys(gen_server:call(forum_store:get_random_pid(alliance),
>>> get_connector_pid), <<"alliance_overview">>).
>>> {ok,[]}
>>> 
>>> 64> 
>>> riakc_pb_socket:list_keys(gen_server:call(forum_store:get_random_pid(alliance),
>>> get_connector_pid), "alliance_overview").
>>> {ok,[]}
>>> 
>>> 65> 
>>> riakc_pb_socket:list_keys(gen_server:call(forum_store:get_random_pid(alliance),
>>> get_connector_pid), "alliance_overview").
>>> =ERROR REPORT==== 21-Jan-2012::08:23:11 ===
>>> ** Generic server <0.24647.5> terminating
>>> ** Last message in was {tcp,#Port<0.5820>,[255|<<"unknown_msg">>]}
>>> ** When Server state == {state,"127.0.0.1",2010,false,false,#Port<0.5820>,
>>>                          {request,#Ref<0.0.4.159143>,
>>>                              {rpblistkeysreq,"alliance_overview"},
>>>                              undefined,
>>>                              {106931976,<0.25063.5>},
>>>                              60000,#Ref<0.0.4.159144>},
>>>                          {[],[]},
>>>                          1,[],infinity,100}
>>> ** Reason for termination ==
>>> ** {function_clause,[{riakclient_pb,decode,[undefined,<<"unknown_msg">>]},
>>>                   {riakc_pb_socket,handle_info,2},
>>>                   {gen_server,handle_msg,5},
>>>                   {proc_lib,init_p_do_apply,3}]}
>>> {error,{timeout,[]}}
>>> 
>>> 66> 
>>> riakc_pb_socket:list_keys(gen_server:call(forum_store:get_random_pid(alliance),
>>> get_connector_pid), "alliance_overview").
>>> {ok,[]}
>>> --end snip
>>> 
>>> Riak console spits out the following at the same time...
>>> 
>>> --snip
>>> nodes().08:23:11.154 [info] Handoff receiver for partition undefined
>>> exited after processing 0 objects
>>> --end snip
>>> 
>>> Error condition does not seem to follow any specific node and the
>>> connections die when the error is thrown so its constantly building
>>> new ones.
>>> 
>>> TIA.
>>> 
>>> -mox
>>> 
>>> _______________________________________________
>>> riak-users mailing list
>>> riak-users@lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> 
> 


_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to