Skip to content

Commit b8a9cf1

Browse files
Merge pull request #14088 from rabbitmq/rabbit_fifo_min
Avoid list allocation
2 parents 90cb557 + 2ca4766 commit b8a9cf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit/src/rabbit_fifo.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2806,7 +2806,7 @@ smallest_raft_index(#?STATE{messages = Messages,
28062806
SmallestDlxRaIdx = rabbit_fifo_dlx:smallest_raft_index(DlxState),
28072807
SmallestMsgsRaIdx = rabbit_fifo_q:get_lowest_index(Messages),
28082808
SmallestRaIdx = rabbit_fifo_index:smallest(Indexes),
2809-
lists:min([SmallestDlxRaIdx, SmallestMsgsRaIdx, SmallestRaIdx]).
2809+
min(min(SmallestDlxRaIdx, SmallestMsgsRaIdx), SmallestRaIdx).
28102810

28112811
make_requeue(ConsumerKey, Notify, [{MsgId, Idx, Header, Msg}], Acc) ->
28122812
lists:reverse([{append,

0 commit comments

Comments
 (0)