You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2023/04/05 18:07:37 UTC

[couchdb] branch configurable-timeouts created (now 61508c828)

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

rnewson pushed a change to branch configurable-timeouts
in repository https://gitbox.apache.org/repos/asf/couchdb.git


      at 61508c828 allow configurable timeouts for _view and _search

This branch includes the following new commits:

     new 61508c828 allow configurable timeouts for _view and _search

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: allow configurable timeouts for _view and _search

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

rnewson pushed a commit to branch configurable-timeouts
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 61508c828a5d5b7a6ef5c8f7e426d6c890bb5d55
Author: Robert Newson <rn...@apache.org>
AuthorDate: Wed Apr 5 18:46:58 2023 +0100

    allow configurable timeouts for _view and _search
---
 src/dreyfus/src/dreyfus_fabric_search.erl | 4 ++--
 src/fabric/src/fabric_util.erl            | 2 +-
 src/fabric/src/fabric_view_map.erl        | 2 +-
 src/fabric/src/fabric_view_reduce.erl     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/dreyfus/src/dreyfus_fabric_search.erl b/src/dreyfus/src/dreyfus_fabric_search.erl
index 7e78e5fc3..f166174ea 100644
--- a/src/dreyfus/src/dreyfus_fabric_search.erl
+++ b/src/dreyfus/src/dreyfus_fabric_search.erl
@@ -120,8 +120,8 @@ go(DbName, DDoc, IndexName, QueryArgs, Counters, Bookmark, RingOpts) ->
             #shard.ref,
             fun handle_message/3,
             State,
-            infinity,
-            1000 * 60 * 60
+            fabric_util:timeout("search", infinity),
+            fabric_util:timeout("search_permsg", 1000 * 60 * 60)
         )
     of
         {ok, Result} ->
diff --git a/src/fabric/src/fabric_util.erl b/src/fabric/src/fabric_util.erl
index f0a6db42e..4acb65c73 100644
--- a/src/fabric/src/fabric_util.erl
+++ b/src/fabric/src/fabric_util.erl
@@ -25,7 +25,7 @@
     remove_down_workers/2, remove_down_workers/3,
     doc_id_and_rev/1
 ]).
--export([request_timeout/0, attachments_timeout/0, all_docs_timeout/0, view_timeout/1]).
+-export([request_timeout/0, attachments_timeout/0, all_docs_timeout/0, view_timeout/1, timeout/2]).
 -export([log_timeout/2, remove_done_workers/2]).
 -export([is_users_db/1, is_replicator_db/1]).
 -export([open_cluster_db/1, open_cluster_db/2]).
diff --git a/src/fabric/src/fabric_view_map.erl b/src/fabric/src/fabric_view_map.erl
index 104086d67..68e0b02cd 100644
--- a/src/fabric/src/fabric_view_map.erl
+++ b/src/fabric/src/fabric_view_map.erl
@@ -106,7 +106,7 @@ go(DbName, Workers, {map, View, _}, Args, Callback, Acc0) ->
             fun handle_message/3,
             State,
             fabric_util:view_timeout(Args),
-            1000 * 60 * 60
+            fabric_util:timeout("view_permsg", 1000 * 60 * 60)
         )
     of
         {ok, NewState} ->
diff --git a/src/fabric/src/fabric_view_reduce.erl b/src/fabric/src/fabric_view_reduce.erl
index 600c8d01a..7957250ba 100644
--- a/src/fabric/src/fabric_view_reduce.erl
+++ b/src/fabric/src/fabric_view_reduce.erl
@@ -105,7 +105,7 @@ go2(DbName, Workers, {red, {_, Lang, View}, _} = VInfo, Args, Callback, Acc0) ->
             fun handle_message/3,
             State,
             fabric_util:view_timeout(Args),
-            1000 * 60 * 60
+            fabric_util:timeout("view_permsg", 1000 * 60 * 60)
         )
     of
         {ok, NewState} ->