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 2023/04/13 16:39:53 UTC
[couchdb] 06/11: allow configurable timeouts for _view and _search
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch backport-a-few-fixes-from-main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 4f8ea09de857f89e83581668f9435642be14b8ed
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..bb104892b 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", "3600000")
)
of
{ok, Result} ->
diff --git a/src/fabric/src/fabric_util.erl b/src/fabric/src/fabric_util.erl
index fbba5bdf8..9f9e76234 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..7b3b75863 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", "3600000")
)
of
{ok, NewState} ->
diff --git a/src/fabric/src/fabric_view_reduce.erl b/src/fabric/src/fabric_view_reduce.erl
index 600c8d01a..90fa523a1 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", "3600000")
)
of
{ok, NewState} ->