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] JetStream: Fail Ack() (and the likes) for AckNone consumer #1032

Merged
merged 1 commit into from Aug 4, 2022

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Aug 4, 2022

Resolves #1027

Signed-off-by: Ivan Kozlovic ivan@synadia.com

Resolves #1027

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic
Copy link
Member Author

kozlovic commented Aug 4, 2022

@mprimi I think that this would have let you know that you should not have been calling Ack[Sync]()for a AckNone ack policy (the OrderedConsumer is creating a consumer with AckNone).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 85.599% when pulling c040b4f on fix_1027 into cc189da on main.

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

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

What is the problem we are trying to solve? The server can handle an ack for an AckNone consumer.

@kozlovic
Copy link
Member Author

kozlovic commented Aug 4, 2022

What is the problem we are trying to solve? The server can handle an ack for an AckNone consumer.

Two problems:

  • Sending unnecessary ACKs to the server(s)
  • Having users incorrectly Ack'ing and trying again and again after getting an "unexpected" error. The context was that Marco had a test using OrderedConsumer and was calling AckSync(), which was working fine until in some cases, when bringing the cluster down and back again, the AckSync() would start to return an error. He was told to ack again in case of error, well, in that case the ack would always fail because the ordered consumer had reset, so the message's ack subject on hand was no longer valid and not known by any of the server, so AckSync() would return an error such as "no responders available".

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@kozlovic kozlovic merged commit d4eeb20 into main Aug 4, 2022
@kozlovic kozlovic deleted the fix_1027 branch August 4, 2022 15:46
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.

Attempting to ACK ordered consumer messages may fail forever
4 participants