C# client (CI) questions re: IfNotModified

Alex Rice alex at mindlube.com
Wed Oct 2 16:52:42 EDT 2013


Just trying to make sure I understand what is the proper usage of this
option IfNotModified in CI.

// (first do a Get of the object)
// do a SetObject on the riakobject with my changes
var putOpts = new RiakPutOptions () { IfNotModified = true };
// do a Put with those Options

When the put fails, because I have forced another client to have
modified the key, I get a result back with:

resultCode = CommunicationError
message = Riak returned an error. Code '0'. Message: modified

So the actual condition is kind of buried in the message string which
is not ideal. Maybe there could be a first-class resultCode named
Modified?

Also I then seem to get subsequently
 ClusterOffline: Unable to access functioning Riak node

Is it possible that CI is interpreting the CommunicationError
internally to think the node is down or something? Just curious- maybe
the unable to access functioning Riak node is because I'm running
basho_bench simultaneously? Could be a co-incidence, but it doesn't
seem like it.
Thanks,
Alex




More information about the riak-users mailing list