Understanding put if_not_modified.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding put if_not_modified.

Igor Karymov
Hi all. I wrote example for understanding  subj, but result is unexpected.
I'm trying to realize simple autoincrement counter.
Where i'm wrong?

My code: https://gist.github.com/1224897

Result look as:
...
reason <<"modified">>
reason <<"modified">>
reason <<"modified">>
reason <<"modified">>
reason <<"modified">>
reason <<"modified">>
[2,5,5,2,5,5,5,2,5,5,5,3,4,3,2,2,1,2,3,3]

riak   from master: 584a5a65464ff03c4353d01dfca869703f015d52
riakc from master: cc27dc2808527ccdd8fea86b130e70516572c138

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Understanding put if_not_modified.

Justin Sheehy
Hi, Igor.

Riak (quite intentionally, for availability reasons) does not provide any sort of global transactions or user-exposed locking. One result of this is that you can't do exactly what you tried -- or least not that simply.

You might be interested in https://github.com/mochi/statebox 

-Justin



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Understanding put if_not_modified.

Igor Karymov
But then what kind of guarantees gives if_not_modified?

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