You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Filipe Manana (JIRA)" <ji...@apache.org> on 2010/09/12 11:17:32 UTC

[jira] Commented: (COUCHDB-884) Improve error handling in couch_rep_reader

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

Filipe Manana commented on COUCHDB-884:
---------------------------------------

Forgot to mention before, that if open_doc_revs in rep_reader doesn't a return a list where all members are #doc{} records (for e.g.  {{not_found, missing}, couch_doc:parse_rev(Rev)}), the rep_writer will crash due to a badmatch exception.

> Improve error handling in couch_rep_reader
> ------------------------------------------
>
>                 Key: COUCHDB-884
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-884
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Replication
>    Affects Versions: 1.0.1
>            Reporter: Filipe Manana
>            Assignee: Filipe Manana
>            Priority: Minor
>         Attachments: rep_reader_errors.patch
>
>
> Currently, the replicator might crash when trying to read a doc from a remote DB. This is due unmatched clauses in a function. Example:
> ** Last message in was {'DOWN',#Ref<0.0.0.687>,process,<0.216.0>,
>                         {function_clause,
>                          [{couch_rep_reader,'-open_doc_revs/3-fun-1-',
>                            [{[{<<"error">>,<<"unauthorized">>},
>                               {<<"reason">>,<<"Authentication required.">>}]},
> The following patch avoids that the replicator crashes in this case and adds a useful error log message as well.
> Is anyone against applying this to trunk and 1.0.x? Adam?

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