nats-server
nats-server copied to clipboard
nats s view select topic T98 instead T03
Defect
Versions of nats-server
and affected client libraries used:
nats-server version 2.9.0
Steps or code to reproduce the issue:
nats s view WAREHOUSE --context=stage_leaf --subject="WAREHOUSE.documents.T03" --since=4h
Expected result:
Only selected subject="WAREHOUSE.documents.T03
Actual result:
subject="WAREHOUSE.documents.T98
Could you share nats stream info
for the stream?
Could you share
nats stream info
for the stream?
nats s info WAREHOUSE Information for Stream WAREHOUSE created 2022-03-29T14:16:10+03:00
Configuration:
Subjects: WAREHOUSE.>
Acknowledgements: true
Retention: File - Limits
Replicas: 1
Discard Policy: Old
Duplicate Window: 2m0s
Allows Msg Delete: true
Allows Purge: true
Allows Rollups: false
Maximum Messages: unlimited
Maximum Bytes: unlimited
Maximum Age: unlimited
Maximum Message Size: unlimited Maximum Consumers: unlimited
State:
Messages: 4,956,765
Bytes: 5.6 GiB
FirstSeq: 1 @ 2022-03-29T12:57:02 UTC
LastSeq: 4,956,765 @ 2022-09-21T14:59:19 UTC
Active Consumers: 364
Thanks, do you do any server restarts? Does ever NATS cli consumer that you create deliver incorrect messages if asked to be filtered or just some? Any timing specifics that might be helpful?
I am trying to reproduce, same topic name and subjects spaced filled with same amount of messages and random payload up to 1Kb and then creating a durable pull consumer and pulling on a specific subject and check that subject is correct. So far not able to reproduce. Going now to loop over all subjects and will report back.
I have been checking the 100 subjects that I have (WAREHOUSE.documents.T00 to WAREHOUSE.documents.T99) randomly, and the test passes. I am running from main branch, so will now try from actual v2.9.0 release to see if it makes a difference.
I have only seen this on streams that existed on the earlier version. Clustered and stand-alone. But can’t get a easy repro
@perestoronin was the stream created on a NATS server version < 2.9.0?
I have used 2.8.4 to generate the data, then run test to consume (randomly) from all subjects (in both the original version and v2.9.0), and so far no issue. Staring that the code at the moment...
@perestoronin was the stream created on a NATS server version < 2.9.0?
Yes, stream created in version 2.8.1 or 2.8.2, or more old ...
If the server is restarted again does the problem persist.
We think we now understand the issue. PR coming, thanks.
We think this is addressed with PR #3486.