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 2021/01/18 12:05:18 UTC

[GitHub] [couchdb] garrensmith opened a new pull request #3332: Timeout transaction

garrensmith opened a new pull request #3332:
URL: https://github.com/apache/couchdb/pull/3332


   <!-- 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
   
   If a mango query exceeds the 5 seconds for a transaction it sends a nasty error:
   ```
   89e90f4c55 req_err(2721591552) erlfdb_error : 1031
       [<<"erlfdb_nif:erlfdb_future_get/1">>,<<"erlfdb:do_transaction/2 L686">>,<<"fabric2_fdb:do_transaction/2 L171">>,<<"fabric2_fdb:transactional/2 L142">>,<<"mango_cursor_view:execute/3 L142">>,<<"mango_httpd:handle_find_req/2 L197">>,<<"mango_httpd:handle_req/2 L37">>,<<"chttpd:handle_req_after_auth/2 L330">>]
   ```
   
   This cleans that up and adds a better error. We also remove the `{restart_tx, true}` for a mango query that uses `_all_docs` to make it consistent with a mango query that uses a view.
   
   ## 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
   
   - [x] 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] rnewson commented on pull request #3332: Timeout transaction

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


   @garrensmith the 408 status code is for when the client takes too long to send the request body, that doesn't appear to be the reason we get a 1031 from fdb?


----------------------------------------------------------------
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] iilyak commented on a change in pull request #3332: Timeout transaction

Posted by GitBox <gi...@apache.org>.
iilyak commented on a change in pull request #3332:
URL: https://github.com/apache/couchdb/pull/3332#discussion_r559521950



##########
File path: src/chttpd/src/chttpd.erl
##########
@@ -1014,6 +1016,9 @@ error_info({request_entity_too_large, DocID}) ->
 error_info(transaction_too_large) ->
     {413, <<"transaction_too_large">>,
         <<"The request transaction is larger than 10MB" >>};
+error_info(transaction_timeout) ->
+    {413, <<"transaction_timeout">>,

Review comment:
       413 is Payload Too Large response. I think we need 408.




----------------------------------------------------------------
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] garrensmith merged pull request #3332: Timeout transaction

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


   


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