From 4e402b222657702c0897214bf455e5a333d24b7a Mon Sep 17 00:00:00 2001 From: Peter Tihanyi Date: Tue, 9 Nov 2021 15:07:05 +0100 Subject: [PATCH] Set Index hashtree sync_stop timeout to 60 sec (#1803) Co-authored-by: Peter Tihanyi --- src/riak_kv_index_hashtree.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/riak_kv_index_hashtree.erl b/src/riak_kv_index_hashtree.erl index f352a0d267..837ab5ee68 100644 --- a/src/riak_kv_index_hashtree.erl +++ b/src/riak_kv_index_hashtree.erl @@ -96,6 +96,9 @@ %% Magic Tree id for 2i data. -define(INDEX_2I_N, {0, 0}). +% gen_server call timeout for sync stop +-define(SYNC_STOP_TIMEOUT, 60000). + %% Throttle used when folding over K/V data to build AAE trees: {Limit, Wait}. %% After traversing Limit bytes, the fold will sleep for Wait milliseconds. %% Default: 1 MB limit / 100 ms wait @@ -244,7 +247,7 @@ stop(Tree) -> sync_stop(undefined) -> ok; sync_stop(Tree) -> - gen_server:call(Tree, stop). + gen_server:call(Tree, stop, ?SYNC_STOP_TIMEOUT). %% @doc Destroy the specified index_hashtree, which will destroy all %% associated hashtrees and terminate.