Skip to content

Commit 3e57efd

Browse files
Quorum queue machine: do not publish certain state records
we can use log state in tests.
1 parent 3b25ba7 commit 3e57efd

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

deps/rabbit/src/rabbit_fifo.erl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,26 @@ which_module(3) -> rabbit_fifo_v3;
925925
which_module(4) -> ?MODULE;
926926
which_module(5) -> ?MODULE.
927927

928+
-define(AUX, aux_v3).
929+
930+
-record(checkpoint, {index :: ra:index(),
931+
timestamp :: milliseconds(),
932+
smallest_index :: undefined | ra:index(),
933+
messages_total :: non_neg_integer(),
934+
indexes = ?CHECK_MIN_INDEXES :: non_neg_integer(),
935+
unused_1 = ?NIL}).
936+
-record(aux_gc, {last_raft_idx = 0 :: ra:index()}).
937+
-record(aux, {name :: atom(),
938+
capacity :: term(),
939+
gc = #aux_gc{} :: #aux_gc{}}).
940+
-record(?AUX, {name :: atom(),
941+
last_decorators_state :: term(),
942+
capacity :: term(),
943+
gc = #aux_gc{} :: #aux_gc{},
944+
tick_pid :: undefined | pid(),
945+
cache = #{} :: map(),
946+
last_checkpoint :: #checkpoint{}}).
947+
928948
init_aux(Name) when is_atom(Name) ->
929949
%% TODO: catch specific exception throw if table already exists
930950
ok = ra_machine_ets:create_table(rabbit_fifo_usage,

deps/rabbit/src/rabbit_fifo.hrl

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -227,23 +227,3 @@
227227
msg_ttl => non_neg_integer(),
228228
created => non_neg_integer()
229229
}.
230-
231-
-define(AUX, aux_v3).
232-
233-
-record(checkpoint, {index :: ra:index(),
234-
timestamp :: milliseconds(),
235-
smallest_index :: undefined | ra:index(),
236-
messages_total :: non_neg_integer(),
237-
indexes = ?CHECK_MIN_INDEXES :: non_neg_integer(),
238-
unused_1 = ?NIL}).
239-
-record(aux_gc, {last_raft_idx = 0 :: ra:index()}).
240-
-record(aux, {name :: atom(),
241-
capacity :: term(),
242-
gc = #aux_gc{} :: #aux_gc{}}).
243-
-record(?AUX, {name :: atom(),
244-
last_decorators_state :: term(),
245-
capacity :: term(),
246-
gc = #aux_gc{} :: #aux_gc{},
247-
tick_pid :: undefined | pid(),
248-
cache = #{} :: map(),
249-
last_checkpoint :: #checkpoint{}}).

0 commit comments

Comments
 (0)