Skip to content

When the messages cached in the stream are empty, kill -9 nats-server and start again, and firstSeq and firstSeq become 0 #2068

Closed
@GuangchaoDeng

Description

@GuangchaoDeng

Defect

When the messages cached in the stream are empty, kill -9 nats-server and start again, and firstSeq and firstSeq become 0

Versions of nats-server and affected client libraries used:

nats-server : 2.2.1
nats : 0.0.22

OS/Container environment:

Red Hat Enterprise Linux Server release 7.2 (Maipo) or other

Steps or code to reproduce the issue:

Describe:

1、Build a leaf node and persist it in file mode

2、Create stream:denggc8, Consumer :denggc8, for subject: denggc8

nats -s nats://leaf_1:leaf_1@localhost:5222 str add denggc8 --subjects="denggc8 " --storage=file --retention=workq --discard=new --max-msgs=-1 --max-bytes=-1 --max-age=-1 --max-msg-size=-1 --dupe-window=5s --replicas=1

nats -s nats://leaf_1:leaf_1@localhost:5222 con add denggc8 denggc8 2 --deliver=all --replay=original --filter="denggc8 " --max-deliver=-1 --max-pending=1 --pull

3、Send 10 messages to Stream Denggc8; And through Consumer: Denggc8 to complete the consumption

stream和consumer info:
before
4、kill -9 leaf node nats-server

5、start leaf node nats-server again

6、stream和consumer info:

after

Expected result:

before

Actual result:

after

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions