You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/05/18 09:24:09 UTC

[GitHub] [couchdb] jcoglan commented on a diff in pull request #3940: Ensure the multipart parser always learns about the workers

jcoglan commented on code in PR #3940:
URL: https://github.com/apache/couchdb/pull/3940#discussion_r875672489


##########
src/chttpd/src/chttpd_db.erl:
##########
@@ -1206,9 +1206,16 @@ db_doc_req(#httpd{method = 'PUT', user_ctx = Ctx} = Req, Db, DocId) ->
             ),
             Doc = couch_doc_from_req(Req, Db, DocId, Doc0),
             try
-                Result = send_updated_doc(Req, Db, DocId, Doc, RespHeaders, UpdateType),
+                {HttpCode, RespHeaders1, RespBody} = update_doc_req(
+                    Req,
+                    Db,
+                    DocId,
+                    Doc,
+                    RespHeaders,
+                    UpdateType
+                ),
                 WaitFun(),
-                Result
+                send_json(Req, HttpCode, RespHeaders1, RespBody)

Review Comment:
   Is the effect of splitting out `send_json` and calling it _after_ `WaitFun()` that we now wait until _all_ the writers have acked the document and attachments, rather than a majority of them, before sending a response to the client?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org