Merge pull request #14088 from rabbitmq/rabbit_fifo_min
Avoid list allocation
This commit is contained in:
commit
b8a9cf12c5
|
@ -2806,7 +2806,7 @@ smallest_raft_index(#?STATE{messages = Messages,
|
||||||
SmallestDlxRaIdx = rabbit_fifo_dlx:smallest_raft_index(DlxState),
|
SmallestDlxRaIdx = rabbit_fifo_dlx:smallest_raft_index(DlxState),
|
||||||
SmallestMsgsRaIdx = rabbit_fifo_q:get_lowest_index(Messages),
|
SmallestMsgsRaIdx = rabbit_fifo_q:get_lowest_index(Messages),
|
||||||
SmallestRaIdx = rabbit_fifo_index:smallest(Indexes),
|
SmallestRaIdx = rabbit_fifo_index:smallest(Indexes),
|
||||||
lists:min([SmallestDlxRaIdx, SmallestMsgsRaIdx, SmallestRaIdx]).
|
min(min(SmallestDlxRaIdx, SmallestMsgsRaIdx), SmallestRaIdx).
|
||||||
|
|
||||||
make_requeue(ConsumerKey, Notify, [{MsgId, Idx, Header, Msg}], Acc) ->
|
make_requeue(ConsumerKey, Notify, [{MsgId, Idx, Header, Msg}], Acc) ->
|
||||||
lists:reverse([{append,
|
lists:reverse([{append,
|
||||||
|
|
Loading…
Reference in New Issue