Hi,
Could someone please comment on this? I am still unsure of the behavior of
ifNotModified when there is no pre-existing key/value in Riak. My *expectation*
is that it should work if creating a new key/pair value with
ifNotModified(true).
Thanks!
________________________________
From: Y N <[email protected]>
To: "[email protected]" <[email protected]>
Cc: Brian Roach <[email protected]>
Sent: Saturday, May 25, 2013 7:21 PM
Subject: Java client - Bug with ifNotModified?
I am using ifNotModified and am running into a weird situation.
I am using the following API:
return bucket.store(key, new
MyObject()).withMutator(mutator).withConverter(converter).ifNotModified(true).returnBody(true).execute();
The problem I run into is that I get a not found exception when there is no
existing object in Riak for the specified key. If I change ifNotModified to
false, then it works as expected. I am allocating a new object in my mutator if
there is no existing object from the fetch cycle. Note, this is with the
default bucket settings.
My expectation was that even with ifNotModified set to true, this should
succeed if there is no existing object in Riak matching the key (hence, nothing
has been modified and the store should succeed).
Please clarify the behavior of the API.
Thanks.
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com