summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkjnilsson <knilsson@pivotal.io>2021-04-13 17:24:16 +0100
committerkjnilsson <knilsson@pivotal.io>2021-04-13 17:24:16 +0100
commitc975457199f80ad9ef2291756a075927b770f473 (patch)
treeb0edc488d8ae20836152a471e70fbd90f5d48b81
parent5bb6bc80e1d45427b99ba2f4503023d4e163d4bc (diff)
downloadrabbitmq-server-git-c975457199f80ad9ef2291756a075927b770f473.tar.gz
rabbit_fifo: add smallest raft index to overview
This is useful information when debugging snapshotting issues.
-rw-r--r--deps/rabbit/src/rabbit_fifo.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/rabbit/src/rabbit_fifo.erl b/deps/rabbit/src/rabbit_fifo.erl
index 9c6b3f9cbe..b205eda0b7 100644
--- a/deps/rabbit/src/rabbit_fifo.erl
+++ b/deps/rabbit/src/rabbit_fifo.erl
@@ -717,6 +717,7 @@ overview(#?MODULE{consumers = Cons,
enqueue_count = EnqCount,
msg_bytes_enqueue = EnqueueBytes,
msg_bytes_checkout = CheckoutBytes,
+ ra_indexes = Indexes,
cfg = Cfg} = State) ->
Conf = #{name => Cfg#cfg.name,
resource => Cfg#cfg.resource,
@@ -730,6 +731,7 @@ overview(#?MODULE{consumers = Cons,
expires => Cfg#cfg.expires,
delivery_limit => Cfg#cfg.delivery_limit
},
+ Smallest = rabbit_fifo_index:smallest(Indexes),
#{type => ?MODULE,
config => Conf,
num_consumers => maps:size(Cons),
@@ -741,7 +743,8 @@ overview(#?MODULE{consumers = Cons,
release_cursors => [I || {_, I, _} <- lqueue:to_list(Cursors)],
release_cursor_enqueue_counter => EnqCount,
enqueue_message_bytes => EnqueueBytes,
- checkout_message_bytes => CheckoutBytes}.
+ checkout_message_bytes => CheckoutBytes,
+ smallest_raft_index => Smallest}.
-spec get_checked_out(consumer_id(), msg_id(), msg_id(), state()) ->
[delivery_msg()].