Skip to content

Commit

Permalink
Set Index hashtree sync_stop timeout to 60 sec (#1803)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Tihanyi <[email protected]>
  • Loading branch information
systream and Peter Tihanyi authored Nov 9, 2021
1 parent ef092fb commit 4e402b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/riak_kv_index_hashtree.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4e402b2

Please sign in to comment.