0
데이터를 riak 데이터베이스에로드하는 프로그램을 실행하고 싶습니다.하지만 범위를 10으로 지정하면 프로세스가 갑자기 중지됩니다. 데이터를로드 할 때, 범위를 10보다 크게 줄 때 전화가 끊겼습니다. 무슨 일이 있었는지.erlang 파일로 Riak에서 데이터를 지속적으로로드하는 방법
test(X,Y) ->
if X < Y ->
{ok,Pid} = riakc_pb_socket:start_link("127.0.0.1",10017),
Val = X,
io:format("~p",[Pid]),
Object = riakc_obj:new(<<"test_age">>,undefined,Val),
riakc_pb_socket:put(Pid,Object),
test(X+1,Y);
true -> []
end.
이 함수는 숫자 범위를 사용하며 이전 숫자에 숫자를 더하면 riak 데이터베이스에 삽입됩니다.
내가 얼랑에서이 프로그램을 실행할 때 약 10 범위 복용 후 중단되는 쉘 : 분 아무것도 그것은 < 0.70.0 이후에 매달려 있었다
erlriak:test(1,5)
<0.50.0><0.51.0><0.52.0><0.53.0><0.54.0>[]
erlriak:test(5,15)
<0.62.0><0.63.0><0.64.0><0.65.0><0.66.0><0.67.0><0.68.0><0.69.0><0.70.0>|
은> returning.I은 무엇입니까이다 다음과 같습니다 :
=ERROR REPORT==== 19-May-2014::17:29:54 ===
** Generic server <0.104.0> terminating
** Last message in was {req_timeout,#Ref<0.0.0.423>}
** When Server state == {state,"127.0.0.1",10017,false,false,undefined,false,
gen_tcp,undefined,
{[],[]},
1,[],infinity,undefined,undefined,undefined,
undefined,[],100}
** Reason for termination ==
** disconnected
** exception exit: disconnected