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

Robert Newson commented on COUCHDB-810:
---------------------------------------

FYI: I tested with the script below. The patch works if you don't see this 
message with the patch applied for new and existing checkpoints (you need three 
local couchdb instances).

"no common ancestry -- performing full replication"

#!/bin/bash

PORTS="5985 5986 5987"

for PORT in $PORTS
do
  curl http://localhost:$PORT/db -X DELETE
  curl http://localhost:$PORT/db -X PUT
  curl http://localhost:$PORT/db/doc -d '{}' -X PUT
done

for I in 1 2 3
do
    curl http://localhost:5985/db/doc5985$I -d '{}' -X PUT
    curl http://localhost:5986/db/doc5986$I -d '{}' -X PUT
    curl http://localhost:5987/db/doc5987$I -d '{}' -X PUT

    curl http://localhost:5985/_replicate -d 
'{"source":"db","target":"http://localhost:5986/db"}'
    curl http://localhost:5985/_replicate -d 
'{"source":"db","target":"http://localhost:5986/db"}'
    curl http://localhost:5987/_replicate -d 
'{"source":"db","target":"http://localhost:5985/db"}'
    curl http://localhost:5987/_replicate -d 
'{"source":"db","target":"http://localhost:5986/db"}'

done


> Running multiple instances on one machine breaks replication
> ------------------------------------------------------------
>
>                 Key: COUCHDB-810
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-810
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 0.11.1, 1.0
>            Reporter: Randall Leeds
>         Attachments: 0001-versioned-replication-ids.patch
>
>
> Bob pointed out that the replication id does not include the port number. As 
> a consequence, replication checkpoints between multiple instances running on 
> the same machine can clobber one another. (Strangely, the port line is there 
> but commented out.)

-- 
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