Skip to content

Commit c963735

Browse files
committed
QQ: more prompt metrics after leader election
1 parent 302fb38 commit c963735

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

deps/rabbit/src/rabbit_quorum_queue.erl

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

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

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

rabbitmq-components.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ 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 = git https://github.com/rabbitmq/ra tick-timout-tweak
55+
ep_ra = hex 2.16.3
5556
dep_ranch = hex 2.2.0
5657
dep_recon = hex 2.5.6
5758
dep_redbug = hex 2.0.7

0 commit comments

Comments
 (0)