You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2020/06/02 21:01:40 UTC

[couchdb] branch add-error-timeout-exception-to-accpet created (now db1d323)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch add-error-timeout-exception-to-accpet
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at db1d323  Handle error:{timeout, _} exception in couch_jobs:accept

This branch includes the following new commits:

     new db1d323  Handle error:{timeout, _} exception in couch_jobs:accept

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb] 01/01: Handle error:{timeout, _} exception in couch_jobs:accept

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch add-error-timeout-exception-to-accpet
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit db1d323060d379d3469004afd98c72ed43a717cc
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Tue Jun 2 16:57:35 2020 -0400

    Handle error:{timeout, _} exception in couch_jobs:accept
    
    Under load accept loop can blow up with timeout error from
    `erlfdb:wait(...)`(https://github.com/apache/couchdb-erlfdb/blob/master/src/erlfdb.erl#L255)
    so guard against it just like we do for fdb transaction timeout (1031) errors.
---
 src/couch_jobs/src/couch_jobs.erl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/couch_jobs/src/couch_jobs.erl b/src/couch_jobs/src/couch_jobs.erl
index adc1b46..5f79407 100644
--- a/src/couch_jobs/src/couch_jobs.erl
+++ b/src/couch_jobs/src/couch_jobs.erl
@@ -300,6 +300,8 @@ accept_loop(Type, NoSched, MaxSchedTime, Timeout) ->
     AcceptResult = try
         couch_jobs_fdb:tx(couch_jobs_fdb:get_jtx(), TxFun)
     catch
+        error:{timeout, _} ->
+            retry;
         error:{erlfdb_error, Err} when Err =:= 1020 orelse Err =:= 1031 ->
             retry
     end,