Skip to content

Commit 9edbe65

Browse files
committed
fixup! WIP Remove CQv1
1 parent fa9c88d commit 9edbe65

File tree

2 files changed

+6
-33
lines changed

2 files changed

+6
-33
lines changed

deps/rabbit/src/rabbit_classic_queue_index_v2.erl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%% Implementation details from the queue index leaking into the
2020
%% queue implementation itself.
2121
%% @todo TODO
22-
-export([sync/1, needs_sync/1, flush/1,
22+
-export([sync/1, needs_sync/1,
2323
bounds/2, next_segment_boundary/1]).
2424

2525
%% Called by rabbit_vhost.
@@ -948,15 +948,6 @@ needs_sync(State = #qi{ confirms = Confirms }) ->
948948
false -> confirms
949949
end.
950950

951-
-spec flush(State) -> State when State::state().
952-
953-
flush(State) ->
954-
?DEBUG("~0p", [State]),
955-
%% Flushing to disk is the same operation as sync
956-
%% except it is called before hibernating or when
957-
%% reducing memory use.
958-
sync(State).
959-
960951
%% ----
961952

962953
-type walker(A) :: fun ((A) -> 'finished' |

deps/rabbit/src/rabbit_variable_queue.erl

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -710,30 +710,12 @@ needs_timeout(#vqstate { index_state = IndexState,
710710
{false, true} -> false
711711
end.
712712

713-
timeout(State = #vqstate { index_state = IndexState0,
714-
store_state = StoreState0,
715-
unconfirmed_simple = UCS,
716-
confirmed = C }) ->
717-
IndexState = rabbit_classic_queue_index_v2:sync(IndexState0),
718-
StoreState = rabbit_classic_queue_store_v2:sync(StoreState0),
719-
State #vqstate { index_state = IndexState,
720-
store_state = StoreState,
721-
unconfirmed_simple = sets:new([{version,2}]),
722-
confirmed = sets:union(C, UCS) }.
723-
724-
handle_pre_hibernate(State = #vqstate { index_state = IndexState0,
725-
store_state = StoreState0,
726-
msg_store_clients = MSCState0,
727-
unconfirmed_simple = UCS,
728-
confirmed = C }) ->
713+
timeout(State) ->
714+
sync(State).
715+
716+
handle_pre_hibernate(State = #vqstate{ msg_store_clients = MSCState0 }) ->
729717
MSCState = msg_store_pre_hibernate(MSCState0),
730-
IndexState = rabbit_classic_queue_index_v2:flush(IndexState0),
731-
StoreState = rabbit_classic_queue_store_v2:sync(StoreState0),
732-
State #vqstate { index_state = IndexState,
733-
store_state = StoreState,
734-
msg_store_clients = MSCState,
735-
unconfirmed_simple = sets:new([{version,2}]),
736-
confirmed = sets:union(C, UCS) }.
718+
sync(State#vqstate{ msg_store_clients = MSCState }).
737719

738720
resume(State) -> a(timeout(State)).
739721

0 commit comments

Comments
 (0)