eiri opened a new pull request #3373:
URL: https://github.com/apache/couchdb/pull/3373


   ## Overview
   
   During `POST` on `/{db}/_changes` with a custom filter, nodes attempt to 
[read the request 
payload](https://github.com/apache/couchdb/blob/3.x/src/couch/src/couch_changes.erl#L241),
 unless the request body already stored on a request record. When this is 
happening on a node foreign to the original http request, reader process quits 
with `exit:normal` and as a result the whole fabric request hangs until a 
timeout.
   
   This patch switches filter reader to `chttpd_external:json_req_obj/2` for 
more descriptive exit message, adds reading of the payload on the request 
handler and validates that payload, when present, is a proper JSON object.
   
   ## Testing recommendations
   
   Related tests been added to the elixir tests
   
   `make elixir tests=test/elixir/test/changes_test.exs`
   
   ## Related Issues or Pull Requests
   
   Closes #3087 
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] A PR for documentation changes has been made in 
https://github.com/apache/couchdb-documentation
   


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


Reply via email to