On 2/23/2011 9:11 AM, Bryan Fink wrote:
On Fri, Feb 18, 2011 at 8:54 PM, Les Mikesell<lesmikes...@gmail.com>  wrote:
What happens if there is a read of the object while it is in the process of
being updated if the update is several different operations?

Luwak streams work in an "all or nothing" fashion.  That is, no read
will see the result of any stream until that stream is flushed.  Luwak
blocks are immutable, so old file trees will still reference
completely valid old blocks while new ones are being written.  The
last action of flushing a stream is to point the file-metdata object
(in the luwak_tld bucket) at the head of the new tree.

A flush will only occur when a stream closes, unless your program
explicitly calls luwak_put_stream:flush/1.


Thanks! A couple more somewhat related questions: is that atomic update nature hard to duplicate outside of luwak (say by a client that needs to keep several items in sync), and if the luwak blocks are immutable, how do you ever clean up the space used by data that has been deleted or modified and no longer referenced?

--
  Les Mikesell
   lesmikes...@gmail.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