incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <jch...@gmail.com>
Subject Re: doc creation consistency ?
Date Thu, 13 May 2010 18:55:02 GMT

On May 13, 2010, at 9:01 AM, Sebastien PASTOR wrote:

> Hello, 
> 
> This might be a silly question but this is just bugging me right now...
> so here it is : what is happening if a PUT request does not get its
> response? Imagine we have a network issue just AFTER couchDB has
> created a doc but BEFORE it could reply back to the client. Does couchDB
> detect that and kinda delete the created doc  or the doc is definitively
> created ? In that case when the client is timing out it believes the
> doc creation  has failed  whereas it has not.
> 
> Sounds tricky but those things could happen right ?
> 

PUT is idempotent, so the client should just retry (usually this happens without the eg xhr
layer even noticing.)

I don't off the top of my head recall what the HTTP response to the 2nd PUT will be.

The most reliable way for the client to see when updates are committed is to watch the _changes
feed.

Chris

> 
> Thanks
> 
> Sebastien.
> 


Mime
View raw message