couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randall Leeds (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-1570) Replicator writes corrupt remote checkpoint document on error; breaks replication
Date Mon, 29 Oct 2012 06:05:12 GMT

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

Randall Leeds commented on COUCHDB-1570:
----------------------------------------

I started investigating this. So far I see no way for checkpoint document to have "null" as
the value for "_revisions.ids". All attempts I've made to create such a document via the http
interface throws {doc_validation, "_revisions.ids isn't a array."}.

I've dug around for a way that couch_db_updater might create such a document in an edge case
but cannot find one.

Jens, is there any information you can provide from the logs of these servers, especially
if you have logs for when the checkpoint failed the first time (if you can find it)?
                
> 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

Mime
View raw message