iilyak commented on a change in pull request #3568:
URL: https://github.com/apache/couchdb/pull/3568#discussion_r635225719
##########
File path: src/couch/src/couch_httpd_multipart.erl
##########
@@ -31,57 +31,63 @@ decode_multipart_stream(ContentType, DataFun, Ref) ->
ParentRef = erlang:monitor(process, Parent),
put(mp_parent_ref, ParentRef),
num_mp_writers(NumMpWriters),
- {<<"--",_/binary>>, _, _} = couch_httpd:parse_multipart_request(
- ContentType, DataFun,
- fun(Next) -> mp_parse_doc(Next, []) end),
+ {<<"--", _/binary>>, _, _} = couch_httpd:parse_multipart_request(
+ ContentType,
+ DataFun,
+ fun(Next) -> mp_parse_doc(Next, []) end
+ ),
unlink(Parent)
- end),
+ end),
Parser ! {get_doc_bytes, Ref, self()},
receive
- {started_open_doc_revs, NewRef} ->
- %% FIXME: How to remove the knowledge about this message?
- {{started_open_doc_revs, NewRef}, Parser, ParserRef};
- {doc_bytes, Ref, DocBytes} ->
- {{doc_bytes, Ref, DocBytes}, Parser, ParserRef};
- {'DOWN', ParserRef, _, _, normal} ->
- ok;
- {'DOWN', ParserRef, process, Parser, {{nocatch, {Error, Msg}}, _}} ->
- ?LOG_ERROR(#{
- what => multipart_streamer_failure,
- ref => ParserRef,
- details => Msg
- }),
- couch_log:error("Multipart streamer ~p died with reason ~p",
- [ParserRef, Msg]),
- throw({Error, Msg});
- {'DOWN', ParserRef, _, _, Reason} ->
- ?LOG_ERROR(#{
- what => multipart_streamer_failure,
- ref => ParserRef,
- details => Reason
- }),
- couch_log:error("Multipart streamer ~p died with reason ~p",
- [ParserRef, Reason]),
- throw({error, Reason})
+ {started_open_doc_revs, NewRef} ->
+ %% FIXME: How to remove the knowledge about this message?
+ {{started_open_doc_revs, NewRef}, Parser, ParserRef};
+ {doc_bytes, Ref, DocBytes} ->
+ {{doc_bytes, Ref, DocBytes}, Parser, ParserRef};
+ {'DOWN', ParserRef, _, _, normal} ->
+ ok;
+ {'DOWN', ParserRef, process, Parser, {{nocatch, {Error, Msg}}, _}} ->
+ ?LOG_ERROR(#{
Review comment:
I am glad erlfmt doesn't choke on macros.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]