Skip to content

Commit 4439150

Browse files
committed
Add timeout to rpc call for force_checkpoint
1 parent 12bf3e0 commit 4439150

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
@@ -140,6 +140,7 @@
140140
-define(RPC_TIMEOUT, 1000).
141141
-define(START_CLUSTER_TIMEOUT, 5000).
142142
-define(START_CLUSTER_RPC_TIMEOUT, 60_000). %% needs to be longer than START_CLUSTER_TIMEOUT
143+
-define(FORCE_CHECKPOINT_RPC_TIMEOUT, 15_000).
143144
-define(TICK_INTERVAL, 5000). %% the ra server tick time
144145
-define(DELETE_TIMEOUT, 5000).
145146
-define(MEMBER_CHANGE_TIMEOUT, 20_000).
@@ -2095,7 +2096,7 @@ force_checkpoint_on_queue(QName) ->
20952096
{ok, Q} when ?amqqueue_is_quorum(Q) ->
20962097
{RaName, _} = amqqueue:get_pid(Q),
20972098
rabbit_log:debug("Sending command to force ~ts to take a checkpoint", [QNameFmt]),
2098-
rpc:call(Node, ra, cast_aux_command, [{RaName, Node}, force_checkpoint]);
2099+
rpc:call(Node, ra, cast_aux_command, [{RaName, Node}, force_checkpoint], ?FORCE_CHECKPOINT_RPC_TIMEOUT);
20992100
{ok, _Q} ->
21002101
{error, not_quorum_queue};
21012102
{error, _} = E ->

0 commit comments

Comments
 (0)