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/07/02 19:15:18 UTC

[GitHub] [couchdb] janl opened a new pull request #2981: fix: set gen_server:call() timeout to infinity on ioq bypass

janl opened a new pull request #2981:
URL: https://github.com/apache/couchdb/pull/2981


   Before the bypass existed, ioq would call `gen_server:call()`
   on hehalf of it calling module with the queueing logic in between.
   
   Commit e641a740 introduced a way to bypass any queues, but the
   delegated `gen_server:call()` there was added without a timeout
   parameter, leading to a default timeout of 5000ms.
   
   A problem manifests here when operations that are sent through
   ioq that take longer than that 5000ms timeout. In practice, these
   operations should be very rare and this timeout should be a help
   on overloaded systems. However, one sure-fire way to cause an issue
   on an otherwise idle machine is raise the max_document_size and
   store unreasonably large documents, think 50MB+ of raw JSON).
   
   Not that we recommend this, but folks have run this fine on 2.x
   before the ioq changes and it isn’t too hard to support here.
   
   By adding an `infinity` timeout delegated `gen_server:call()` in
   the queue bypasse case, this no longer applies.
   
   Thanks to Joan @woahli Touzet, Bob @rnewson Newson and
   Paul @davisp Davis for helping to track this down.
   
   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   <!-- Please give a short brief for the pull request,
        what problem it solves or how it makes things better. -->
   
   ## Testing recommendations
   
   <!-- Describe how we can test your changes.
        Does it provides any behaviour that the end users
        could notice? -->
   
   ## Related Issues or Pull Requests
   
   <!-- If your changes affects multiple components in different
        repositories please put links to those issues or pull requests here.  -->
   
   ## Checklist
   
   - [ ] Code is written and works correctly
   - [ ] 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:
users@infra.apache.org



[GitHub] [couchdb] janl commented on pull request #2981: fix: set gen_server:call() timeout to infinity on ioq bypass

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


   transitive +1 via https://github.com/apache/couchdb/pull/2980


----------------------------------------------------------------
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 merged pull request #2981: fix: set gen_server:call() timeout to infinity on ioq bypass

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


   


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