diff options
| author | kjnilsson <knilsson@pivotal.io> | 2019-12-13 13:36:26 +0000 |
|---|---|---|
| committer | kjnilsson <knilsson@pivotal.io> | 2019-12-13 13:36:26 +0000 |
| commit | 845c0e3783668b64dcbcd1fca2f4f8cdb1ab2aeb (patch) | |
| tree | 5b87b9aac192e3fe212f5be8aa90f8ff4e1216a7 | |
| parent | 3605ce32b38ef7bce038580ed9408a224e023c8c (diff) | |
| download | rabbitmq-server-git-845c0e3783668b64dcbcd1fca2f4f8cdb1ab2aeb.tar.gz | |
Update rabbit_fifo with Ra aux changes
Ra now will automatically pass `eval` and `tick` to handle_aux after
each applied batch and tick even respectively. This updates the state
machine to handle this.
| -rw-r--r-- | src/rabbit_fifo.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_fifo.erl b/src/rabbit_fifo.erl index 0f77c2726f..2131585dc4 100644 --- a/src/rabbit_fifo.erl +++ b/src/rabbit_fifo.erl @@ -601,7 +601,7 @@ tick(_Ts, #?MODULE{cfg = #cfg{name = Name, EnqueueBytes, CheckoutBytes}, [{mod_call, rabbit_quorum_queue, - handle_tick, [QName, Metrics, all_nodes(State)]}, {aux, emit}]. + handle_tick, [QName, Metrics, all_nodes(State)]}]. -spec overview(state()) -> map(). overview(#?MODULE{consumers = Cons, @@ -643,9 +643,11 @@ handle_aux(_, cast, Cmd, {Name, Use0}, Log, _) -> Use = case Cmd of _ when Cmd == active orelse Cmd == inactive -> update_use(Use0, Cmd); - emit -> + tick -> true = ets:insert(rabbit_fifo_usage, {Name, utilisation(Use0)}), + Use0; + eval -> Use0 end, {no_reply, {Name, Use}, Log}. |
