summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2023-04-05 18:46:58 +0100
committerRobert Newson <rnewson@apache.org>2023-04-05 20:28:10 +0100
commit5c99df17058e78336c5f17551d4d753749b405a6 (patch)
treeff0db843be6d90426c7577d4eed16ed49d376241
parent31e3f64e6934bbfbca19069a4fd5407df744df54 (diff)
downloadcouchdb-5c99df17058e78336c5f17551d4d753749b405a6.tar.gz
allow configurable timeouts for _view and _search
-rw-r--r--src/dreyfus/src/dreyfus_fabric_search.erl4
-rw-r--r--src/fabric/src/fabric_util.erl2
-rw-r--r--src/fabric/src/fabric_view_map.erl2
-rw-r--r--src/fabric/src/fabric_view_reduce.erl2
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 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..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} ->