Skip to content

Commit 739460e

Browse files
committed
Ra 2.16.5 - bug fixes and minor improvements
* Don't allow a non-voter to start elections * Register with ra directory before initialising ra server. by @kjnilsson in #524 * Trigger tick_timeout immedately after entering leader state. * Set a configurable segment max size
1 parent 44657cd commit 739460e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

deps/rabbit/src/rabbit_quorum_queue.erl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,13 @@ local_or_remote_handler(ChPid, Module, Function, Args) ->
425425
erpc:cast(Node, Module, Function, Args)
426426
end.
427427

428-
become_leader(QName, Name) ->
428+
become_leader(_QName, _Name) ->
429+
%% noop now as we instead rely on the promt tick_timeout + repair
430+
ok.
429431
%% as this function is called synchronously when a ra node becomes leader
430432
%% we need to ensure there is no chance of blocking as else the ra node
431433
%% may not be able to establish its leadership
432-
spawn(fun () -> become_leader0(QName, Name) end).
434+
% spawn(fun () -> become_leader0(QName, Name) end).
433435

434436
become_leader0(QName, Name) ->
435437
Fun = fun (Q1) ->
@@ -683,8 +685,8 @@ repair_leader_record(Q, Self) ->
683685
ok;
684686
_ ->
685687
QName = amqqueue:get_name(Q),
686-
rabbit_log:debug("~ts: repairing leader record",
687-
[rabbit_misc:rs(QName)]),
688+
rabbit_log:debug("~ts: updating leader record to current node ~b",
689+
[rabbit_misc:rs(QName), Node]),
688690
{_, Name} = erlang:process_info(Self, registered_name),
689691
ok = become_leader0(QName, Name),
690692
ok

rabbitmq-components.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dep_khepri_mnesia_migration = hex 0.7.1
5151
dep_meck = hex 1.0.0
5252
dep_osiris = git https://github.com/rabbitmq/osiris v1.8.6
5353
dep_prometheus = hex 4.11.0
54-
dep_ra = hex 2.16.3
54+
dep_ra = hex 2.16.5
5555
dep_ranch = hex 2.2.0
5656
dep_recon = hex 2.5.6
5757
dep_redbug = hex 2.0.7

0 commit comments

Comments
 (0)