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 2020/09/04 12:16:23 UTC

[GitHub] [couchdb] rnewson opened a new pull request #3129: Add option to delay responses until the end

rnewson opened a new pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129


   ## Overview
   
   When set, every response is sent once fully generated on the server
   side. This increases memory usage on the nodes but simplifies error
   handling for the client as it eliminates the possibility that the
   response will be deliberately terminated midway through due to a
   timeout.
   
   The config value can be changed at runtime without impacting any
   in-flight responses.
   
   ## Testing recommendations
   
   Set [chttpd] delay_until_end to true then confirm that streamed responses are now sent non-stream (i.e, with a Content-Length header and not in chunked transfer mode).
   
   ## Related Issues or Pull Requests
   
   N/A
   
   ## Checklist
   
   - [x] Code is written and works correctly
   - [x] Changes are covered by tests
   - [x] 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:
users@infra.apache.org



[GitHub] [couchdb] rnewson commented on pull request #3129: Add option to delay responses until the end

Posted by GitBox <gi...@apache.org>.
rnewson commented on pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129#issuecomment-687255497


   thinking I might reference "transfer encoding" explicitly, with "identity" and "chunked" instead of boolean?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] rnewson commented on pull request #3129: Add option to delay responses until the end

Posted by GitBox <gi...@apache.org>.
rnewson commented on pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129#issuecomment-687256024


   enh, but the point of the change is the delay. not sending the response until we're sure we can send the whole thing, it's not really about the transfer encoding, that's a side-effect (it just seemed silly send a chunked response when I have the whole thing in memory and can calculate the content-length)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] rnewson merged pull request #3129: Add option to delay responses until the end

Posted by GitBox <gi...@apache.org>.
rnewson merged pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] rnewson commented on pull request #3129: Add option to delay responses until the end

Posted by GitBox <gi...@apache.org>.
rnewson commented on pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129#issuecomment-687260435


   buffer_response it is.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] rnewson commented on pull request #3129: Add option to delay responses until the end

Posted by GitBox <gi...@apache.org>.
rnewson commented on pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129#issuecomment-687194404


   @janl done. I am interested in feedback on the name of this config setting and request param (i.e, I don't much like my choice but can't think of a better name).


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] janl commented on pull request #3129: Add option to delay responses until the end

Posted by GitBox <gi...@apache.org>.
janl commented on pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129#issuecomment-687120461


   Neat! Have you considered making this a per-request option instead of a global config?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] janl commented on pull request #3129: Add option to delay responses until the end

Posted by GitBox <gi...@apache.org>.
janl commented on pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129#issuecomment-687245848


   OTOH:
   
   - `buffer_response(s)`
   - `disable_streaming_response(s)`


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [couchdb] rnewson commented on pull request #3129: Add option to delay responses until the end

Posted by GitBox <gi...@apache.org>.
rnewson commented on pull request #3129:
URL: https://github.com/apache/couchdb/pull/3129#issuecomment-687158207


   I'm open to that, sure, would not be hard to make it a request parameter as we have the original Req at the start.


----------------------------------------------------------------
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:
users@infra.apache.org