Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/82#discussion_r41985112
  
    --- Diff: src/chttpd_db.erl ---
    @@ -733,7 +741,17 @@ db_doc_req(#httpd{method='POST', user_ctx=Ctx}=Req, 
Db, DocId) ->
         NewDoc = Doc#doc{
             atts = UpdatedAtts ++ OldAtts2
         },
    -    case fabric:update_doc(Db, NewDoc, Options) of
    +    couch_log:debug("chttpd_db: couchNew doc formed including new att: 
formed",[]),
    +    lists:foreach(fun(X) -> couch_log:debug("~p~n 
~p~n",[couch_att:fetch(data, X), couch_att:fetch(name, X)]) end, 
NewDoc#doc.atts),
    --- End diff --
    
    Please, don't do this: if document has a lot of attachments, this loop will 
spin without producing any useful work, but only slow down all around.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to