Fisher,

Once upon a time, I knew Luwak pretty darn well.  From what I remember, the
length should be the number of bytes of the content.  So if you're file on
the client is 1056 bytes (as an example), but Luwak says 1098, then yea,
maybe something is wrong.  To be sure pull the data from Luwak into another
file and compare the two via `wc` and `diff`.  If this is a large file
perhaps something failed during the process, check the log files for
failures.  Also, if the file is large you'll get a response back _before_
Luwak has finished persisting all the data as it buffers it in memory.
 IIRC, the length only accounts for persisted data and not data that it is
still waiting in the buffer.  There is a synchronous API but it's only
available via Erlang.

I just realized you have a later thread talking about lost data in Luwak
but I figured I'd still send this response in case anyone else has the same
behavior and is curious how to diagnose.

-Ryan

On Wed, Dec 7, 2011 at 7:28 AM, vuleetu <[email protected]> wrote:

> Hi, All
>
>     Right now, the size get from luwak is not the same as record in our
> datbase. Can i use the way to get rid of these broken files:
>
>    1)  After write file to luwak using luwak_put_stream:send(), then call
>  luwak_put_stream:close() to close the put stream.
>    2) Use luwak_put_stream:status() to get the latest luwak file handler,
> then call luwak_file:length(Riak, RiakFileHandler) to get the file final
> size in riak. Check if the size in database is the same as the size, if the
> size is different, does that mean the file is broken? Does this way make
> sence?
>
> Thanks
> Fisher
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to