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] Consumer fixes and improvements on state management. #3892

Merged
merged 4 commits into from Feb 21, 2023

Conversation

derekcollison
Copy link
Member

Make sure to also cleanup pending if below our stream ack floor.
Make sure to clean up redelivered state on purge.
Make sure to update ack floors on messages being expired out from underneath of us.
Fixed bug that would lose ack pending state during partial stream purge.
Make sure we warn properly of consumer state update failures.

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

/cc @nats-io/core

General code cleanup to be more correct.

Signed-off-by: Derek Collison <derek@nats.io>
Make sure to update ack floors on messages being expired out from underneath of us.

Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Derek Collison <derek@nats.io>
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.

Few nits around tests.
Leaving as a comment to not block merge if I'm already asleep when fixed as those are just nits.

server/jetstream_test.go Outdated Show resolved Hide resolved
server/jetstream_test.go Outdated Show resolved Hide resolved

// Ack all again
for _, m := range msgs {
m.Ack()
Copy link
Member

Choose a reason for hiding this comment

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

probably check error?

Copy link
Member Author

Choose a reason for hiding this comment

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

Async, so no error will be propagated and the we do flush and the checks below on consumer info guarantee the acks were processed.

server/jetstream_test.go Outdated Show resolved Hide resolved
server/jetstream_test.go Outdated Show resolved Hide resolved
Signed-off-by: Derek Collison <derek@nats.io>
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!

@derekcollison derekcollison merged commit 18b5aca into main Feb 21, 2023
@derekcollison derekcollison deleted the consumer-fixes branch February 21, 2023 02:17
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.

None yet

4 participants