Skip to content

Commit 7e56416

Browse files
aaron-seomichaelklishin
authored andcommitted
Add timeout to rpc call for force_checkpoint
(cherry picked from commit 4439150)
1 parent df916d5 commit 7e56416

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deps/rabbit/src/rabbit_quorum_queue.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
-define(RPC_TIMEOUT, 1000).
144144
-define(START_CLUSTER_TIMEOUT, 5000).
145145
-define(START_CLUSTER_RPC_TIMEOUT, 60_000). %% needs to be longer than START_CLUSTER_TIMEOUT
146+
-define(FORCE_CHECKPOINT_RPC_TIMEOUT, 15_000).
146147
-define(TICK_INTERVAL, 5000). %% the ra server tick time
147148
-define(DELETE_TIMEOUT, 5000).
148149
-define(MEMBER_CHANGE_TIMEOUT, 20_000).
@@ -2100,7 +2101,7 @@ force_checkpoint_on_queue(QName) ->
21002101
{ok, Q} when ?amqqueue_is_quorum(Q) ->
21012102
{RaName, _} = amqqueue:get_pid(Q),
21022103
rabbit_log:debug("Sending command to force ~ts to take a checkpoint", [QNameFmt]),
2103-
rpc:call(Node, ra, cast_aux_command, [{RaName, Node}, force_checkpoint]);
2104+
rpc:call(Node, ra, cast_aux_command, [{RaName, Node}, force_checkpoint], ?FORCE_CHECKPOINT_RPC_TIMEOUT);
21042105
{ok, _Q} ->
21052106
{error, not_quorum_queue};
21062107
{error, _} = E ->

0 commit comments

Comments
 (0)