You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Adam Kocoloski <ad...@gmail.com> on 2009/01/27 01:14:16 UTC

is update_docs(_, _, _, false) idempotent?

Jason and I were working through COUCHDB-197 and discussing whether to  
retry failed HTTP requests during replication.  GET requests are  
surely safe to retry, but after I thought about it for awhile it  
seemed like the POSTs that occur during replication are also safe.

The POST to _missing_revs on the target server clearly does not change  
the state of the server; I assume it's a POST because the request has  
a body.  _bulk_docs is not normally an idempotent operation, but when  
"new_edits":false is sent along with the docs it looks like it might  
be, since no new revisions are generated.

Adam

Re: is update_docs(_, _, _, false) idempotent?

Posted by Adam Kocoloski <ad...@gmail.com>.
Thanks, Damien, that's what I had suspected.  Best, Adam

On Jan 26, 2009, at 7:34 PM, Damien Katz wrote:

> Everything the replicator does, except for update the replication  
> records at the end, is idempotent. The updating of documents for  
> replication must be idempotent as it might be racing the same  
> document that's replicating in from another source.
>
> -Damien
>
>
> On Jan 26, 2009, at 7:14 PM, Adam Kocoloski wrote:
>
>> Jason and I were working through COUCHDB-197 and discussing whether  
>> to retry failed HTTP requests during replication.  GET requests are  
>> surely safe to retry, but after I thought about it for awhile it  
>> seemed like the POSTs that occur during replication are also safe.
>>
>> The POST to _missing_revs on the target server clearly does not  
>> change the state of the server; I assume it's a POST because the  
>> request has a body.  _bulk_docs is not normally an idempotent  
>> operation, but when "new_edits":false is sent along with the docs  
>> it looks like it might be, since no new revisions are generated.
>>
>> Adam
>


Re: is update_docs(_, _, _, false) idempotent?

Posted by Damien Katz <da...@apache.org>.
Everything the replicator does, except for update the replication  
records at the end, is idempotent. The updating of documents for  
replication must be idempotent as it might be racing the same document  
that's replicating in from another source.

-Damien


On Jan 26, 2009, at 7:14 PM, Adam Kocoloski wrote:

> Jason and I were working through COUCHDB-197 and discussing whether  
> to retry failed HTTP requests during replication.  GET requests are  
> surely safe to retry, but after I thought about it for awhile it  
> seemed like the POSTs that occur during replication are also safe.
>
> The POST to _missing_revs on the target server clearly does not  
> change the state of the server; I assume it's a POST because the  
> request has a body.  _bulk_docs is not normally an idempotent  
> operation, but when "new_edits":false is sent along with the docs it  
> looks like it might be, since no new revisions are generated.
>
> Adam