-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Consumer Last Delivered Message is way ahead of stream Last Sequence [v2.10.20, v2.10.22] #6124
Comments
I've been observing this as well (as recently as today), but haven't been able to come up with a way to reproduce reliably it so that I can make a useful bug report. We're running 2.10.22. Typically I have seen it after NATS runs out of memory. When this happens, in many cases we tend to also observe what appears to be stream corruption on the node that OOMed that cascades and results in data loss. The loss of data causes the sequence numbers to reset and the affected stream consumers will have consumer offsets off in the future. Currently, we just fix this by deleting and recreating the consumer, since I don't believe there's a way to reset the consumer position. |
Thanks for the report @kylemcc, we've been able to reproduce some conditions which cause this and are now investigating. By any chance do you recreate the streams using the same name or use purge operations on the stream? |
@kylemcc in the issue report you mentioned v2.10.20, is that the version where first ran into the issue or was it on v2.10.22? |
We don't typically recreate or purge streams. We've done it once or twice, but that was accompanied by also deleting/recreating the consumers.
I don't remember exactly when I first encountered it, but I found a thread in our Slack from late last year where it was mentioned (so, early 2.10?). That said, we don't see it terribly often, but it has occurred a couple times on the current version. Wish I could offer something more helpful. Happy to share logs, profiles, or anything else you would find useful next time it happens. |
@kylemcc when you run into it, what is helpful to share if you can in order to analyze is the full output of |
I have faced this issue too, twice in a week with nats-server 2.10.11. Had to delete and recreated the consumer to solve it. |
Hi @wallyqs any idea about this ? |
Observed behavior
Consumer Last Delivered Message is way ahead of stream Last Sequence. This makes consumer stop delivering messages.
Expected behavior
Consumer delivered message should never exceed stream last message.
Server and client version
Server: 2.10.20
Client: io.nats:jnats:2.16.10
Host environment
No response
Steps to reproduce
Stream info:
Consumer info:
Note stream last sequence: 221,508, and consumer last delivered message: 595,118. The ack-floor at the same time is 134,907.
How is this even possible?
The text was updated successfully, but these errors were encountered: