Skip to content

Commit 5c9dbdf

Browse files
dumbbellmergify[bot]
authored andcommitted
Revert "rabbit_feature_flags: Retry after erpc:call() fails with noconnection"
This reverts commit 8749c60. [Why] The patch was supposed to solve an issue that we didn't understand and that was likely a network/DNS problem outside of RabbitMQ. We know it didn't solve that issue because it was reported again 6 months after the initial pull request (#8411). What we are sure however is that it increased the testing of RabbitMQ significantly because the code loops for 10+ minutes if the remote node is not running. The retry in the Feature flags subsystem was not the right place either. The `noconnection` error is visible there because it runs earlier during RabbitMQ startup. But retrying there won't solve a network issue magically. There are two ways to create a cluster: 1. peer discovery and this subsystem takes care of retries if necessary and appropriate 2. manually using the CLI, in which case the user is responsible for starting RabbitMQ nodes and clustering them Let's revert it until the root cause is really understood. (cherry picked from commit d0c13b4)
1 parent 01d248f commit 5c9dbdf

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

deps/rabbit/src/rabbit_ff_controller.erl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,32 +1380,9 @@ this_node_first(Nodes) ->
13801380
Ret :: term() | {error, term()}.
13811381

13821382
rpc_call(Node, Module, Function, Args, Timeout) ->
1383-
SleepBetweenRetries = 5000,
1384-
T0 = erlang:monotonic_time(),
13851383
try
13861384
erpc:call(Node, Module, Function, Args, Timeout)
13871385
catch
1388-
%% In case of `noconnection' with `Timeout'=infinity, we don't retry
1389-
%% at all. This is because the infinity "timeout" is used to run
1390-
%% callbacks on remote node and they can last an indefinite amount of
1391-
%% time, for instance, if there is a lot of data to migrate.
1392-
error:{erpc, noconnection} = Reason
1393-
when is_integer(Timeout) andalso Timeout > SleepBetweenRetries ->
1394-
?LOG_WARNING(
1395-
"Feature flags: no connection to node `~ts`; "
1396-
"retrying in ~b milliseconds",
1397-
[Node, SleepBetweenRetries],
1398-
#{domain => ?RMQLOG_DOMAIN_FEAT_FLAGS}),
1399-
timer:sleep(SleepBetweenRetries),
1400-
T1 = erlang:monotonic_time(),
1401-
TDiff = erlang:convert_time_unit(T1 - T0, native, millisecond),
1402-
Remaining = Timeout - TDiff,
1403-
Timeout1 = erlang:max(Remaining, 0),
1404-
case Timeout1 of
1405-
0 -> {error, Reason};
1406-
_ -> rpc_call(Node, Module, Function, Args, Timeout1)
1407-
end;
1408-
14091386
Class:Reason:Stacktrace ->
14101387
Message0 = erl_error:format_exception(Class, Reason, Stacktrace),
14111388
Message1 = lists:flatten(Message0),

0 commit comments

Comments
 (0)