How is this handled on requests where the the server does the link insertion and walking for you? That is, you have some existing links and simultaneously add multiple new items that add themselves to the same links, then ask the server to return the values from link walking. Does the client know that the link updates may have conflicted or does the server do some kind of resolution during the walk?

 Les Mikesell
   [email protected]


On 6/22/2011 10:23 AM, Mathias Meyer wrote:
And here's the link I neatly forgot to include:

http://wiki.basho.com/Vector-Clocks.html

Mathias Meyer
Developer Advocate, Basho Technologies


On Mittwoch, 22. Juni 2011 at 17:18, Mathias Meyer wrote:

Manuel,

what you're seeing is not specific to links, it's generally how concurrent 
updates to a single object are handled in Riak, links are no exception. If you 
want to handle that properly you need to enable the allow_mult property on the 
bucket in question.

Now, whenever two clients update the same object based on the same origin (i.e. 
vector clock) they'll cause siblings to be created. The next time you fetch the 
object you'll get both siblings and you can then reconcile the difference, e.g. 
merging all links together, checking if they're still valid, etc., and then 
store back the updated value using the vector clock you got when requesting the 
object including the siblings.

We have wiki page [1] dedicated to vector clocks and conflict resolution, 
explaining the process in more detail.

Mathias Meyer
Developer Advocate, Basho Technologies

[1]

On Mittwoch, 22. Juni 2011 at 11:14, Manuel Astudillo wrote:


Hello,


Probably I have some miss understating on whats the best way to update links in 
Riak, but I am wondering if you know about this hazard when updating links:


client A: getLinks(X)
client B: getLinks(X)


clientB:updateLinks(X)
clientA:updateLinks(X)


where the update made by B is cleaned by A, and it seems like there is not even 
any way to get a notification about it or detect it somehow...



_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to