summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiana Corbacho <diana@rabbitmq.com>2019-03-15 17:13:32 +0000
committerDiana Corbacho <diana@rabbitmq.com>2019-03-15 17:13:32 +0000
commit6dce82e7c5847bfb01c380912b4a9d53d0deb9f7 (patch)
tree134f303dab58d3986bd4557dfd5187c6fdee3c80 /src
parenta81ce662d0c06c15cb7d7d3ebd9aa1c328861768 (diff)
downloadrabbitmq-server-git-6dce82e7c5847bfb01c380912b4a9d53d0deb9f7.tar.gz
Explain why last_applied is initialised to -1
[#164375485]
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_fifo_client.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rabbit_fifo_client.erl b/src/rabbit_fifo_client.erl
index ba60b9d01c..edc58ba489 100644
--- a/src/rabbit_fifo_client.erl
+++ b/src/rabbit_fifo_client.erl
@@ -65,6 +65,9 @@
servers = [] :: [ra_server_id()],
leader :: maybe(ra_server_id()),
next_seq = 0 :: seq(),
+ %% Last applied is initialise to -1 to note that no command has yet been
+ %% applied, but allowing to resend messages if the first ones on the sequence
+ %% are lost (messages are sent from last_applied + 1)
last_applied = -1 :: maybe_seq(),
next_enqueue_seq = 1 :: seq(),
%% indicates that we've exceeded the soft limit