Skip to content

Commit 76ee321

Browse files
author
Daniil Fedotov
committed
Remove duplicate migration. Match no_ack message
1 parent c020b81 commit 76ee321

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/rabbit_variable_queue.erl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,10 +2666,6 @@ rabbit_log:error("MIGRATING!!"),
26662666
OldStore = run_old_persistent_store(RecoveryTerms, StartFunState),
26672667
%% New store should not be recovered.
26682668
NewStoreSup = start_new_store_sup(),
2669-
lists:map(fun(Queue) ->
2670-
migrate_queue(Queue, OldStore, NewStoreSup)
2671-
end,
2672-
Queues),
26732669

26742670
{ok, Gatherer} = gatherer:start_link(),
26752671
lists:map(
@@ -2699,7 +2695,7 @@ migrate_queue(Queue, OldStore, NewStoreSup) ->
26992695
rabbit_queue_index:scan_queue_segments(
27002696
%% We migrate only persistent messages, which is stored in msg_store
27012697
%% and is not acked yet
2702-
fun (_SeqId, MsgId, _MsgProps, true, _IsDelivered, false, OldC)
2698+
fun (_SeqId, MsgId, _MsgProps, true, _IsDelivered, no_ack, OldC)
27032699
when is_binary(MsgId) ->
27042700
migrate_message(MsgId, OldC, NewStoreClient);
27052701
(_SeqId, _MsgId, _MsgProps,
@@ -2720,7 +2716,7 @@ migrate_message(MsgId, OldC, NewC) ->
27202716
ok = rabbit_msg_store:remove([MsgId], OldC1),
27212717
OldC1;
27222718
_ -> OldC
2723-
end;
2719+
end.
27242720

27252721
get_new_store_client(#amqqueue{name = #resource{virtual_host = VHost}},
27262722
NewStoreSup) ->

0 commit comments

Comments
 (0)