[ https://issues.apache.org/jira/browse/COUCHDB-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Randall Leeds closed COUCHDB-1570. ---------------------------------- Thanks. > Replicator writes corrupt remote checkpoint document on error; breaks > replication > --------------------------------------------------------------------------------- > > Key: COUCHDB-1570 > URL: https://issues.apache.org/jira/browse/COUCHDB-1570 > Project: CouchDB > Issue Type: Bug > Components: Replication > Affects Versions: 1.2 > Environment: Mac OS X 10.8.2 > Reporter: Jens Alfke > Assignee: Randall Leeds > Priority: Blocker > Fix For: 1.3 > > > If a 'push' replication receives error responses from the remote server while > PUTting documents, it may write a corrupt checkpoint document to the remote > server -- its _revisions._ids property is null. Any subsequent attempt to > push to that server will cause the replicator to abort with an error when > reading that replication document, since it requires _revisions.ids to be an > array. > The only workaround for this, short of deleting the remote database entirely, > is to (a) identify the URL of the remote checkpoint document, and (b) delete > it from the remote server. Otherwise you will never be able to push to that > database again. > Here's a failed replication attempt: > $ curl -X POST --user snej :5984/_replicate --header > Content-Type:application/json --data > '{"source":"demo-shopping-attachments","target":"http://localhost:4984/demo-shopping-attachments","create_target":true}' > {"error":"doc_validation","reason":"_revisions.ids isn't a array."} > Here's the contents of the remote checkpoint document, once I identified its > ID: > $ curl :4984/demo-shopping-attachments/_local/5b913befe682d7bd1fbc24b1ce31cbc5 > {"_id":"_local/5b913befe682d7bd1fbc24b1ce31cbc5","_rev":"0-1","_revisions":{"ids":null,"start":0},"history":[{"doc_write_failures":2,"docs_read":2,"docs_written":0,"end_last_seq":207,"end_time":"Sun, > 21 Oct 2012 19:40:04 > GMT","missing_checked":17,"missing_found":2,"recorded_seq":207,"session_id":"9a24dc37885b5b4e507ea90702b2fecf","start_last_seq":0,"start_time":"Sun, > 21 Oct 2012 19:40:04 > GMT"}],"replication_id_version":2,"session_id":"9a24dc37885b5b4e507ea90702b2fecf","source_last_seq":207} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira