couchdb-replication mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: Help with a replicator incompatibility/crash?
Date Thu, 30 Jan 2014 13:19:54 GMT
I commented on the issue:

It looks like we are not handling a 404 in the function below, especially thefun(200, Headers,
StreamDataFun) -> bit (that’s like 171 in couch_replicator_api_wrap).

I’m not too familiar with that code, maybe one of Adam, Bob, Filipe, Benoit could have a

cc dev@

open_doc_revs(#httpdb{} = HttpDb, Id, Revs, Options, Fun, Acc) ->
    Path = encode_doc_id(Id),
    QArgs = options_to_query_args(
        HttpDb, Path, [revs, {open_revs, Revs} | Options]),
    Self = self(),
    Streamer = spawn_link(fun() ->
                [{path, Path}, {qs, QArgs},
                    {ibrowse_options, [{stream_to, {self(), once}}]},
                    {headers, [{"Accept", "multipart/mixed"}]}],
                fun(200, Headers, StreamDataFun) ->
                    {<<"--">>, _, _} = couch_httpd:parse_multipart_request(
                        get_value("Content-Type", Headers),
                        fun mp_parse_mixed/1)
    {started_open_doc_revs, Ref} ->
        receive_docs_loop(Streamer, Fun, Id, Revs, Ref, Acc)

On 29 Jan 2014, at 16:35 , Jens Alfke <> wrote:

> A developer has reported a CouchDB 1.3 exception/crash replicating with the Couchbase
Sync Gateway. They've attached the Erlang crash report, but those are about as readable to
me as ancient Aramaic, or the logos* of black-metal bands :(
> Could someone who knows CouchDB take a look and give me a clue about what it might be
taking exception [sic] to? In my experience, there are some areas where it gets very picky
about parsing incoming data, for example the number of newlines at the end of a multipart
body. If I had some idea what type of data it was reading when it barfed, that would help
me figure this out...
> Thanks!
> —Jens
> * viz.:

View raw message