Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions deps/rabbit/src/rabbit_backing_queue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,6 @@
%% each message, its ack tag, and an accumulator.
-callback ackfold(msg_fun(A), A, state(), [ack()]) -> {A, state()}.

%% Fold over all the messages in a queue and return the accumulated
%% results, leaving the queue undisturbed.
-callback fold(fun((mc:state(),
rabbit_types:message_properties(),
boolean(), A) -> {('stop' | 'cont'), A}),
A, state()) -> {A, state()}.

%% How long is my queue?
-callback len(state()) -> non_neg_integer().

Expand Down
285 changes: 69 additions & 216 deletions deps/rabbit/src/rabbit_classic_queue_index_v2.erl

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions deps/rabbit/src/rabbit_classic_queue_store_v2.erl
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ info(#qs{ write_buffer = WriteBuffer }) ->

%% @todo I think we can disable the old message store at the same
%% place where we create MsgId. If many queues receive the
%% message, then we create an MsgId. If not, we don't. But
%% we can only do this after removing support for v1.
%% message, then we create an MsgId. If not, we don't until
%% strictly necessary (large messages).
write(SeqId, Msg, Props, State0 = #qs{ write_buffer = WriteBuffer0,
write_buffer_size = WriteBufferSize }) ->
?DEBUG("~0p ~0p ~0p ~0p", [SeqId, Msg, Props, State0]),
Expand Down
1 change: 1 addition & 0 deletions deps/rabbit/src/rabbit_guid.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

-spec start_link() -> rabbit_types:ok_pid_or_error().

%% @todo Serial can be in persistent_term instead of process.
start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE,
[update_disk_serial()], []).
Expand Down
7 changes: 1 addition & 6 deletions deps/rabbit/src/rabbit_priority_queue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
purge/1, purge_acks/1,
publish/5, publish_delivered/4, discard/3, drain_confirmed/1,
dropwhile/2, fetchwhile/4, fetch/2, drop/2, ack/2, requeue/2,
ackfold/4, fold/3, len/1, is_empty/1, depth/1,
ackfold/4, len/1, is_empty/1, depth/1,
update_rates/1, needs_timeout/1, timeout/1,
handle_pre_hibernate/1, resume/1, msg_rates/1,
info/2, invoke/3, is_duplicate/2, set_queue_mode/2,
Expand Down Expand Up @@ -302,11 +302,6 @@ ackfold(MsgFun, Acc, State = #state{bq = BQ}, AckTags) ->
ackfold(MsgFun, Acc, State = #passthrough{bq = BQ, bqs = BQS}, AckTags) ->
?passthrough2(ackfold(MsgFun, Acc, BQS, AckTags)).

fold(Fun, Acc, State = #state{bq = BQ}) ->
fold2(fun (_P, BQSN, AccN) -> BQ:fold(Fun, AccN, BQSN) end, Acc, State);
fold(Fun, Acc, State = #passthrough{bq = BQ, bqs = BQS}) ->
?passthrough2(fold(Fun, Acc, BQS)).

len(#state{bq = BQ, bqss = BQSs}) ->
add0(fun (_P, BQSN) -> BQ:len(BQSN) end, BQSs);
len(#passthrough{bq = BQ, bqs = BQS}) ->
Expand Down
Loading
Loading