Changing following code (javascript code using riak-js)

db.save(bucket, id, data, meta);

into the the following solved it.

db.save(bucket, id, data, meta, function() {} );

Difference is the callback function, even though an empty one. How it could 
make such a difference is beyond me. However, a subsequent GET operation after 
a PUT operation was not returning the body, probably existence of that callback 
function gives time for things to bubble up.

-g


Begin forwarded message:

> From: gibraltar <[email protected]>
> Subject: 204 statusCode
> Date: November 30, 2012 1:16:35 AM EST
> To: "[email protected]" <[email protected]>
> 
> 
> Hi all,
> 
> As part of load test (of my application, not Riak), I'm making successive 
> fetch/GET requests in a rapid fire fashion. I once got 204 status code 
> (successful but no content response). I do know that there exist an object 
> for that key since previous 105 calls did return the body, but how come I did 
> not get it at 106th time? There's no conditional request or anything and each 
> call is identical. So far it happened once, but should I take this into 
> account or ignore it? 
> 
> I only care if an object exists, I would like to fetch it, modify it and put 
> it back. But when I get statusCode 204 does that mean that I need to repeat 
> the fetch call until I get statusCode 200 and the body? Does one need to work 
> around this nature of Riak at each point of contact? 
> 
> I am looking for a specific answer for 204 condition as well as some insight 
> about using a database like Riak and how one needs to treat it compared to 
> RDBMS. My previous experience with RDBMS is one of deterministic, and I think 
> there's nothing wrong with Riak, but seems like these two tools need to 
> treated differently. What do you say?
> 
> I'm using riak-js for the client. There's one riak node on my laptop, and 
> using LevelDB.
> 
> Thanks,
> Gibraltar
> 

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

Reply via email to