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] Notifying waiting pull consumers on consumer or parent stream deletion. #3605

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

derekcollison
Copy link
Member

Signed-off-by: Derek Collison [email protected]

Resolves #3603

/cc @nats-io/core

Signed-off-by: Derek Collison <[email protected]>
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

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

LGTM

if o.mset == nil || o.outq == nil || o.waiting.len() == 0 {
return
}
hdr := []byte("NATS/1.0 409 Consumer Deleted\r\n\r\n")
Copy link
Member

Choose a reason for hiding this comment

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

I guess we don't need to send the pending msgs/bytes in this case since the consumer is deleted.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that is correct, but should we add it?

Copy link
Member

Choose a reason for hiding this comment

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

Again, since the consumer is really gone, I am not sure what the library will do with the extra info, but we could just to be consistent.

Copy link
Member Author

Choose a reason for hiding this comment

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

True but we would want to surface consumer deleted IMO, not subscription closed etc.

server/jetstream_cluster_3_test.go Show resolved Hide resolved
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

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

LGTM. I don't think we need to add, but we could, up to you.

if o.mset == nil || o.outq == nil || o.waiting.len() == 0 {
return
}
hdr := []byte("NATS/1.0 409 Consumer Deleted\r\n\r\n")
Copy link
Member

Choose a reason for hiding this comment

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

Again, since the consumer is really gone, I am not sure what the library will do with the extra info, but we could just to be consistent.

server/jetstream_cluster_3_test.go Show resolved Hide resolved
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.

Pull consumer - notify the client about stream/consumer no being available
2 participants