Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-884

Improve error handling in couch_rep_reader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.1
    • None
    • Replication
    • None

    Description

      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',
          [
          Unknown macro: {[{<<"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?

      Attachments

        1. rep_reader_errors.patch
          5 kB
          Filipe David Borba Manana

        Activity

          People

            fdmanana Filipe David Borba Manana
            fdmanana Filipe David Borba Manana
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: