mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 10:10:42 -07:00
Do not let the redelivered count go down on re-applying on restarts
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -6687,7 +6687,10 @@ func (o *consumerFileStore) UpdateDelivered(dseq, sseq, dc uint64, ts int64) err
|
||||
if o.state.Redelivered == nil {
|
||||
o.state.Redelivered = make(map[uint64]uint64)
|
||||
}
|
||||
o.state.Redelivered[sseq] = dc - 1
|
||||
// Only update if greater then what we already have.
|
||||
if o.state.Redelivered[sseq] < dc {
|
||||
o.state.Redelivered[sseq] = dc - 1
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// For AckNone just update delivered and ackfloor at the same time.
|
||||
|
||||
Reference in New Issue
Block a user