Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] Multiple deliveries of messages with delivery count going backwards. #5305

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

derekcollison
Copy link
Member

When we fail to deliver a message, we were not checking if this was a redelivery already and would decrement o.sseq, meaning we would pick up the same message after the next redelivery and would have a delivered count of 1.

This could lead to a message being delivered from the redelivery queue, but that could fail, then you would see same message twice, first with dc of 2, then 1.

Now app only gets one copy with delivery count of 2.

Signed-off-by: Derek Collison derek@nats.io

Jarema and others added 4 commits April 11, 2024 13:18
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
…ery.

This could lead to a message being delivered from the redelivery queue, but that could fail, then you would see same message twice, first with dc of 2, then 1.
Now app only gets one with dc of 2.

Signed-off-by: Derek Collison <derek@nats.io>
@derekcollison derekcollison requested a review from a team as a code owner April 11, 2024 18:46
Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@derekcollison derekcollison merged commit c3416ca into main Apr 11, 2024
4 checks passed
@derekcollison derekcollison deleted the fetch-unsub-err branch April 11, 2024 19:24
wallyqs pushed a commit that referenced this pull request Apr 11, 2024
…kwards. (#5305)

When we fail to deliver a message, we were not checking if this was a
redelivery already and would decrement o.sseq, meaning we would pick up
the same message after the next redelivery and would have a delivered
count of 1.

This could lead to a message being delivered from the redelivery queue,
but that could fail, then you would see same message twice, first with
dc of 2, then 1.

Now app only gets one copy with delivery count of 2.

Signed-off-by: Derek Collison <derek@nats.io>

---------

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
Co-authored-by: Tomasz Pietrek <tomasz@nats.io>
wallyqs added a commit that referenced this pull request Apr 11, 2024
Cherry-picks the following into the v2.10.14 release branch:

* #5303
* #5305

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants