Hi, all I am working on a storage system which receives data from the client and stores it to luwak. The server also records the file size of that file which is uploaded successfully to the database, but i found it is not the same size as the data in luwak even after several days, so that is not a consistency problem.
The following is the main process: 1) check if file exists already luwak_file:exists() 2) if it doesn't exist, will use luwak_file:create to create one, or else will use luwak_file:get to get that file handle, 3) use the last offset which is recorded in database, and the create put stream luwak_put_stream:start(Riak, RiakFile, Offset, ?STREAM_PUT_TTL) 4) receive data from client, and write to put stream created above gen_tcp: recv() luwak_put_stream:send(PutStream, Binary) Is there any possibility that data is lost because one of the riak node's network is not stable? Because i found when i call luwak_put_stream:put(), it just send message contain the data to one process, so i dont know if data is lost or sent successfully. Even if I call flush, it is still a request message to that process. Is there any function to tell me if the write was successful or not? What about if that riak node goes down in the middle of writing data to luwak, what would happen, will it cause the data to be lost? Thanks, Fisher
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com