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

Randall Leeds commented on COUCHDB-1024:
----------------------------------------

I'm looking at the new_replicator branch.
I see a problem in couch_replicator_utils.erl that breaks backwards 
compatibility with existing replication checkpoints.

parse_rep_db/2 converts a remote endpoint to #httpdb.
In the old code, a bare URL in source or target would result in {remote, Url, 
[]} from get_rep_endpoint/1.
In the new code, a bare URL becomes #httpdb{url=Url, headers = [], oauth = 
nil}. get_rep_endpoint/1 in this case gives {remote, Url, [], nil}.
This term is part of the md5 sum to identify the replication and the checkpoint 
document.

We can convert everything to the new format, but you should use the code I 
wrote for couch_rep for finding and migrating old checkpoints.

This is also a good time to suggest that we extract the meaningful information 
from UserCtx in the local case instead of using the whole record. Otherwise, 
changes to the #user_ctx record break checkpoints in a way which is not 
obvious. I just ran into this problem during upgrade from 0.10.2 to 1.0.2.

> New replicator implementation
> -----------------------------
>
>                 Key: COUCHDB-1024
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1024
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Replication
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>             Fix For: 1.2
>
>
> As recently posted to the development mailing:
> http://mail-archives.apache.org/mod_mbox/couchdb-dev/201101.mbox/%[email protected]%3E
> ( shortened URL http://s.apache.org/KsY )
> There's a new replicator implementation. I won't explain here all the details 
> since it's already done by that mail sent to the development list.
> @Adam, do you think you can give it a review?
> The full diff is at:  
> https://github.com/fdmanana/couchdb/compare/trunk_new_replicator
> Would be equally happy if others are able and willing to review and test as 
> well.
> Also take note that some pull replications of databases with attachments 
> created by prior CouchDB releases (including 1.0.1, but excluding the soon to 
> be released 1.0.2) may hang forever. This is fixed by applying the patch for 
> COUCHDB-1022 to the source server.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to