[ 
https://issues.apache.org/jira/browse/COUCHDB-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987266#action_12987266
 ] 

Randall Leeds commented on COUCHDB-1041:
----------------------------------------

I'm +1 on having this be a failure condition for replication and a 409 makes 
sense to me.
Here's at least one case where the error will not recover: save a checkpoint 
locally but it fails (time out, network issue, etc) remotely.
At the very least CouchDB should attempt to recover by reading the _rev from 
the remote checkpoint document so it doesn't get the same conflict again next 
time it checkpoints.

In most scenarios, except long-running replications (which going forward should 
be in the replicator db), this should maybe be failure. For transient network 
issues I would be fine with this case stopping the replication so long as it 
doesn't prohibit the replicator db from restarting it. I think this fits the 
duties of the replicator db and prevents the experience Benjamin reports.

> Send replication "conflict (are you replicating to yourself?)" error back
> -------------------------------------------------------------------------
>
>                 Key: COUCHDB-1041
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1041
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: HTTP Interface
>    Affects Versions: 1.0.1, 1.1
>            Reporter: Benjamin Young
>            Priority: Minor
>
> I have three local CouchDB instances on various ports (differing versions). I 
> accidently entered the port number for the instance I was replicating *to* in 
> the *from* field, so the replication would have been to and from the same 
> database. CouchDB doesn't currently send that error to the client, though it 
> does output this in the logs: "checkpoint failure: conflict (are you 
> replicating to yourself?)"
> It would be handy (at least for Futon) to have that information in either the 
> response body or in the header. The log error message does include "conflict" 
> in the wording, so perhaps a 409 Conflict error message is in order.
> Happy to provide a patch if 409 is the way to go.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to