diff options
| author | Diana Corbacho <diana@rabbitmq.com> | 2019-03-15 17:13:32 +0000 |
|---|---|---|
| committer | Diana Corbacho <diana@rabbitmq.com> | 2019-03-15 17:13:32 +0000 |
| commit | 6dce82e7c5847bfb01c380912b4a9d53d0deb9f7 (patch) | |
| tree | 134f303dab58d3986bd4557dfd5187c6fdee3c80 /src | |
| parent | a81ce662d0c06c15cb7d7d3ebd9aa1c328861768 (diff) | |
| download | rabbitmq-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.erl | 3 |
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 |
